En Thu, 06 Mar 2008 20:45:09 -0200, <[EMAIL PROTECTED]> escribi�:

> I'd like to question the source of the definition of C.__eq__.
>
> Observation:
>
>>>> class C: pass
> ...
>>>> class D: pass
> ...
>>>> C== D
> False
>
> What is different about them?  I've created two empty classes, nothing
> more.

Their __name__ attribute?
Types are compared by their memory addresses, not by contents, and that's  
enough and efficient for most people. If you require something different,  
use a metaclass.

-- 
Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to