On 04/08/2013 07:55 AM, Steven D'Aprano wrote:
On 08/04/13 20:45, Dave Angel wrote:

will always fail, since the integer 2 is not equal to the type int.
In Python 2.x, when you compare objects of different types, you
generally get unequal.  (Exception, if you define your own classes,
you can define how they compare to others)  In Python 3, you'd get an
exception.


Not so. Equality testing is always allowed.


Right.  Thanks for the correction.  I should know better by now.

I knew I should have left that part off, since the OP is using version 2 anyway.

--
DaveA
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to