[ZODB-Dev] Default comparison considered harmful in BTrees.

Hanno Schlichting hanno at hannosch.eu
Wed Oct 27 09:17:21 EDT 2010


On Mon, Oct 25, 2010 at 11:51 PM, Jim Fulton <jim at zope.com> wrote:
> I'm inclined to treat the use of the comparison operator inherited
> from object in BTrees to be a bug.  I plan to fix this on the
> trunk.

Did you mean to throw warnings for simple built-in types?

I'm now getting warnings for simple strings and ints, I'd expect
tuples as well. All of these do inherit from object and use the
default __cmp__. But their hash implementation used in the default
__cmp__ should be safe to use.

Hanno


More information about the ZODB-Dev mailing list