This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Dennis Sweeney
Recipients Dennis Sweeney, tladd
Date 2021-02-04.22:07:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1612476448.94.0.897062391055.issue43130@roundup.psfhosted.org>
In-reply-to
Content
This is the expected behavior.

From https://docs.python.org/3/tutorial/introduction.html#first-steps-towards-programming

"""
In Python, like in C, any non-zero integer value is true; zero is false. The condition may also be a string or list value, in fact any sequence; anything with a non-zero length is true, empty sequences are false.
"""


From https://docs.python.org/3/tutorial/datastructures.html?highlight=short%20circuit#more-on-conditions

"""
The Boolean operators and and or are so-called short-circuit operators: their arguments are evaluated from left to right, and evaluation stops as soon as the outcome is determined. For example, if A and C are true but B is false, A and B and C does not evaluate the expression C. When used as a general value and not as a Boolean, the return value of a short-circuit operator is the last evaluated argument.
"""
History
Date User Action Args
2021-02-04 22:07:28Dennis Sweeneysetrecipients: + Dennis Sweeney, tladd
2021-02-04 22:07:28Dennis Sweeneysetmessageid: <1612476448.94.0.897062391055.issue43130@roundup.psfhosted.org>
2021-02-04 22:07:28Dennis Sweeneylinkissue43130 messages
2021-02-04 22:07:28Dennis Sweeneycreate