comparing strings and ints

Randall Hopper aa8vb at
Mon Apr 17 14:02:33 EDT 2000

Arg.  This just bit again (me this time), but with the max() function:

>>> max(3,'2')

I wish there'd have been a type exception here.  

For now, I guess just be very careful when parsing datafiles that you
convert all your numeric strings to some other type; you'll get no warning
if you don't.

Randall Hopper
aa8vb at

More information about the Python-list mailing list