Beginning programming with Python

Alternative Fluffy gerglery at usa.net
Fri Nov 19 04:56:11 EST 1999


Boudewijn Rempt <boud at rempt.xs4all.nl> wrote:

> You needn't guess about that, I guess ;-). I didn't know there
> was a design team for Python, I though it was Guido's invention.
> But I still wonder about the double == - if I can't assign in
> an if, why insist on ==?

Here is one example of why they need to be different:

>>> y = a = 0
>>> z = a == 0
>>> print y
0
>>> print z
1





More information about the Python-list mailing list