Why = = (and not just =)

Joe Green someone at microsoft.com
Sun Oct 19 15:51:51 EDT 2003


Sorry, I cant help aking stupid questions:

I understand why we need = = in C, but why in Python (or Java),
surely if you write
 if a=b: pass # syntax error
it could not possibly mean anything other than what I intended
(which was of course if a = = b:) ?






More information about the Python-list mailing list