How to shoot yourself in the foot with Python
Accidentally compare a character and an integer.
$ python -c 'print "\0" > 1024'
True
Wait, what? Any character is larger than any integer? Why are chars and ints intercomparable then? Shouldn’t I get either a type error or a meaningful comparison? This seems like it’s guaranteed to be wrong!
Comments Off on How to shoot yourself in the foot with Python