[ZODB-Dev] Comparing BTrees.IOBTree.IOSet(s)
Dieter Maurer
dieter at handshake.de
Wed Nov 5 14:43:57 EST 2003
Tim Peters wrote at 2003-11-2 16:06 -0500:
> [Simon Pamies]
> > how can I compare two IOSets?
>
> Well, first you'd have define what comparing two IOSets means, because
> there's no compelling total ordering on sets. You'll have to make up some
> more-or-less arbitrary meaning.
> > a = IOSet().update([1,2,3,4])
> > b = IOSet().update([1,2,3,4])
> > a == b
> > 0
>
But "equality" is *much* weaker than "total order".
And there is a natural equality test for sets <wink>.
It would make "a == b" true in the example above.
--
Dieter
More information about the ZODB-Dev
mailing list