Numeric don't compare arrays correctly

Mike C. Fletcher mcfletch at
Fri Jun 6 23:08:26 CEST 2003

Alexander Schmolck wrote:

>``3 < 1 < 4`` (False in python, True in most other languages where it isn't a
>syntax error)
OMG!  That's horrific!  It actually took me 3 or 4 seconds to even come 
up with a rationale for why it would be considered true when it so 
obviously is trying to say something false.  Hopefully all those 
languages with these semantics issue a strong warning during compilation 
(1/5 ;) ) that this statement does nothing useful and should never be 
used in anything save obfuscated code contests :) .

Every once in a while I thank Guido for God's common sense (or vice 
versa).  Have fun,

  Mike C. Fletcher
  Designer, VR Plumber, Coder

More information about the Python-list mailing list