[EMAIL PROTECTED] wrote: > On May 12, 11:02�pm, Steven D'Aprano [ ... ] > > But you can't trust a==d returning True to mean a and d are > "equal". To say the comparison means the two objects are > equal is misleading, in other words, wrong. It only takes one > turd to spoil the whole punchbowl. > Unfortunately that is the very *definition* of "equal".
>> gmpy.mpz(1) on the other hand, is both a numeric type and a custom class. >> It is free to define equal any way that makes sense, and it treats itself >> as a numeric type and therefore says that it is equal to 1, just like 1.0 >> and 1+0j are equal to 1. > > They are equal in the mathematical sense, but not otherwise. > And to think that makes no difference is to be naive. > Perhaps so, but you are a long way from the original question now! regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://del.icio.us/steve.holden ------------------ Asciimercial --------------------- Get on the web: Blog, lens and tag your way to fame!! holdenweb.blogspot.com squidoo.com/pythonology tagged items: del.icio.us/steve.holden/python All these services currently offer free registration! -------------- Thank You for Reading ---------------- -- http://mail.python.org/mailman/listinfo/python-list