Equality operator

Marek Kubica pythonmailing at web.de
Sat Mar 5 22:02:03 CET 2005


> Why doesn't this statement execute in Python:
> 
> 1 == not 0
> 
> I get a syntax error, but I don't know why. 

This does: 1 == (not 0)
I presume Python treats it like

1 (== not) 0

Which is a SyntaxError

greets,
Marek




More information about the Python-list mailing list