order independent hash?

Chris Angelico rosuav at gmail.com
Sun Dec 4 09:08:53 EST 2011


2011/12/5 Hrvoje Niksic <hniksic at xemacs.org>:
> If a Python
> implementation tried to implement dict as a tree, instances of classes
> that define only __eq__ and __hash__ would not be correctly inserted in
> such a dict.

Couldn't you just make a tree of hash values? Okay, that's probably
not the most useful way to do things, but technically it'd comply with
the spec.

ChrisA



More information about the Python-list mailing list