Identity inconsistency and unification of types and classes

Rim rimbalaya at yahoo.com
Mon Jun 30 23:43:27 EDT 2003


Hi,

With the great unification of types and classes, what will happen to the
following identity inconsistency?

>>> class myint(int): pass
... 
>>> a=int(1); b=int(1)
>>> a is b
1
>>> a=myint(1); b=myint(1)
>>> a is b 
0

Thanks
- Rim




More information about the Python-list mailing list