Would there be support for a more general cmp/__cmp__

Tim Peters tim.peters at gmail.com
Thu Oct 20 19:50:27 CEST 2005

[Toby Dickenson]
> ...
> ZODB's BTrees work in a similar way but use the regular python comparison
> function, and the lack of a guarantee of a total ordering can be a liability.
> Described here in 2002, but I think same is true today:
> http://mail.zope.org/pipermail/zodb-dev/2002-February/002304.html

There's a long discussion of this in the ZODB Programming Guide,
subsection "5.3.1 Total Ordering and Persistence" on this page:


That talks about more than the referenced ZODB thread covered.

Persistence adds more twists, such as that the total ordering among
keys must remain the same across time (including across Python
releases; for example, how None compares to objects of other types has
changed across releases).

More information about the Python-list mailing list