More than you ever wanted to know about objects

Boris Borcic ruses at users.ch
Mon Jan 16 05:31:07 EST 2006


Mike Meyer wrote :
> 
> For even more fun, consider 1.0 == 1 == decimal.Decimal('1.0').
> 

Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on 
win32
Type "copyright", "credits" or "license()" for more information.
 >>> import decimal
 >>> 1 == 1.0 == decimal.Decimal('1.0')
False
 >>> decimal.Decimal('1.0') == 1 == 1.0
True

MMhhhh, painful



More information about the Python-list mailing list