Why '==' ??

JCM joshway_without_spam at myway.com
Tue Mar 30 15:50:39 CEST 2004

Fuzzyman <michael at foord.net> wrote:
> I may be about to get flamed as some heretic against the ancient
> way..... but if assignment in conditional statements isn't
> possible.... why do we need to use '==' instead of just '=' for if and
> while statements ?

> It's possible there are places where the interpreter could fail to
> understand it, but I haven't found them yet. If there *aren't* any
> situations where one could be confused for the other... then it's not
> needed and is annoying :-)

a = b = c
a = b == c

More information about the Python-list mailing list