Is it really good?

Skip Montanaro skip at pobox.com
Tue Jan 7 18:43:46 EST 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 pobox.com






More information about the Python-list mailing list