Identity dictionnary

Erik Max Francis max at alcyone.com
Sat Feb 28 21:11:44 EST 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 alcyone.com && http://www.alcyone.com/max/
/  \ 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