Is it really good?

Skip Montanaro skip at
Wed Jan 8 00:43:46 CET 2003

    Nadav> Can someone explain why python does not raise NameError in the
    Nadav> first test line b[e]low.

    >>> 2 == 3 is good
    0     # ????????????????????????

Chained operations.  The above expression is effectively

    (2 == 3) and (3 is good)

The first is false, so the second is never evaluated.

Skip Montanaro
skip at

More information about the Python-list mailing list