Python 3.0, rich comparisons and sorting order

Tim Peters tim.peters at gmail.com
Tue Sep 21 15:19:55 EDT 2004


[Steven Bethard]
>> Is there a good use case for binary trees with incompatible types
at the nodes?

[Jeremy Bowers]
> See the ZODB's BTree-based storage.

If you really look at them, you'll eventually read the "Total Ordering
and Persistence" section of the BTree docs:

<http://zope.org/Wikis/ZODB/FrontPage/guide/node6.html#SECTION000631000000000000000>

It's strongly recommended there that people use a single key type per
BTree instance.  Most of that part of the docs is explaining how many
nasty ways there are to get into bad trouble by being cleverer than
that.



More information about the Python-list mailing list