Tim Peters <t...@python.org> added the comment:

BTW, the docs also spell out that "and" and "or" ALWAYS evaluate their left 
operand before their right operand, and don't evaluate the right operand at all 
if the result of evaluating the left operand is true (for "or") or false (for 
"and").  So, e.g., 

    result = (EXPR1) or (EXPR2)

acts like

    result = EXPR1
    if not bool(result):
        result = EXPR2

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38060>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to