Neil Schemenauer wrote: > On Thu, Jul 07, 2005 at 08:55:10PM +0200, Mario Ruggier wrote: > >>Shall I consider hashing the keys myself? I am not sure what the >>implications are to my code... > > > You need to have a __cmp__ method that provides a stable total > ordering of the keys. It must still give the same order after keys > are pickled and loaded. FWIW, you can see similar problems if you screw up your rich comparison operators (__lt__ & friends). Not that I know from personal experience or anything (ahem). BTW, I thought __cmp__ was deprecated... seems a shame - it's so much easier than spelling out all the rich operators... -- Peter Fein pfein@pobox.com 773-575-0694 Basically, if you're not a utopianist, you're a schmuck. -J. Feldman