Identity dictionnary

Erik Max Francis max at
Sun Feb 29 03:11:44 CET 2004

Jean-Sebastien Roy wrote:

> I'm trying to create an object to be used as a key in a dictionary,
> where comparison (for key retrieval) would be done by 'is' instead of
> __eq__.
> (__eq__ is defined in this object, but serve another purpose and does
> not return a boolean).

Why would you override __eq__ in such a bizarre way?

 __ Erik Max Francis && max at &&
/  \ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
\__/ You must surely know / If man made Heaven, then man made Hell
    -- Level 42

More information about the Python-list mailing list