1 > 0 == True -> False

Jussi Piitulainen jpiitula at ling.helsinki.fi
Thu Jan 30 15:14:33 EST 2014


Roy Smith writes:

> On Thursday, January 30, 2014 9:56:19 AM UTC-5, Jussi Piitulainen wrote:
> 
> > There's nothing to parenthesize in x <= y < z = w
> 
> Hmm....
> 
> >>> x <= y < z = w
>   File "<stdin>", line 1
> SyntaxError: can't assign to comparison
> 
> I don't think any number of parentheses will help that :-)

Er, sorry about that. Here:

>>> x <= y < z == w
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'x' is not defined

Much better :)



More information about the Python-list mailing list