Less than is more than ?

Andrew Thompson andrew.thompson at ashecastle.com
Fri Dec 20 10:54:24 EST 2002


I just got bitten by  100 < '10' returning 1 -- or true. 

Obviously I meant to use string.atoi() here, but problem is that my
program compiled and ran happily!

100.__cmp__('foo') raises an Exception, as expected.

This seems to happen on 2.1.1 , and 2.2.1 Activestate.

Have I missed something here?






More information about the Python-list mailing list