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 Windson Yang
Recipients Windson Yang, docs@python, serhiy.storchaka, steven.daprano
Date 2019-03-09.09:06:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1552122371.21.0.960455224145.issue36248@roundup.psfhosted.org>
In-reply-to
Content
Thank you Serhiy, we did document here: 

> The expression x and y first evaluates x; if x is false, its value is returned; otherwise, y is evaluated and the resulting value is returned.

> The expression x or y first evaluates x; if x is true, its value is returned; otherwise, y is evaluated and the resulting value is returned.

Sorry, Steven. I should make it clear. I think the output of the example(1, 3) depends on the input order of number(1 or 0, 0 or 1) is not an expected behavior to me. Maybe we can add an example/note in the document. 

"Sometimes this will cause unexpected behavior when you put `or` and `and` together..."
History
Date User Action Args
2019-03-09 09:06:11Windson Yangsetrecipients: + Windson Yang, steven.daprano, docs@python, serhiy.storchaka
2019-03-09 09:06:11Windson Yangsetmessageid: <1552122371.21.0.960455224145.issue36248@roundup.psfhosted.org>
2019-03-09 09:06:11Windson Yanglinkissue36248 messages
2019-03-09 09:06:11Windson Yangcreate