On Sat, 31 Dec 2022 at 09:29, Ian Pilcher <arequip...@gmail.com> wrote: > > On 12/30/22 15:47, Paul Bryan wrote: > > What kind of elements are being added to the set? Can you show > > reproducible sample code? > > The objects in question are DHCP leases. I consider them "equal" if > the lease address (or IPv6 prefix) is equal, even if the timestamps have > changed. That code is not small, but it's easy to demonstrate the > behavior.
Seems the more logical approach would be to use a dictionary mapping the lease address/prefix to the timestamp? The part that contributes to the equality check is the key, and everything else is the value. ChrisA -- https://mail.python.org/mailman/listinfo/python-list