durusmail: durus-users: snag with btree.get(key)
snag with btree.get(key)
2005-07-07
2005-07-07
2005-07-07
2005-07-08
2005-07-08
2005-07-08
2005-07-08
2005-07-08
2005-07-11
2005-07-08
2005-07-08
2005-07-08
2005-07-08
Schevo and moellus [was: Re: [Durus-users] snag with btree.get(key)]
2005-07-11
Re: Schevo and moellus [was: Re: [Durus-users] snag with btree.get(key)]
2005-07-13
2005-07-14
2005-07-14
2005-07-14
2005-07-13
2005-07-07
snag with btree.get(key)
Neil Schemenauer
2005-07-07
On Thu, Jul 07, 2005 at 12:38:38PM -0600, Neil Schemenauer wrote:
> Something like this would probably work (untested):
>
>     def __cmp__(self, other):
>         if self is other:
>             return 0
>         return cmp(self, other)

Oops, no.  Don't do that.  The ordering of btree keys *must* be
stable.  You can't compare memory addresses or your btree will
become insane.

  Neil
reply