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 shreyanavigyan
Recipients Carl.Friedrich.Bolz, alimuldal, nedbat, pablogsal, rrauenza, sco1, serhiy.storchaka, shreyanavigyan
Date 2021-04-13.19:50:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Hi. I'm totally confused about other keywords but I'm a little concerned about the "and", "or" operator when used on, not only "int" (also known as "long") but also most Python objects other then bool type.

Mostly when used on Python built-in objects "and", "or" keyword returns a very peculiar result. The "and" keyword returns the Python object on the left hand side while "or" returns the Python object on the right hand side. This applies to all Python object, built-in or user-defined, unless it has a specific __and__ or __or__ method defined. 

What is actually going on?
Date User Action Args
2021-04-13 19:50:18shreyanavigyansetrecipients: + shreyanavigyan, Carl.Friedrich.Bolz, nedbat, serhiy.storchaka, pablogsal, sco1, alimuldal, rrauenza
2021-04-13 19:50:18shreyanavigyansetmessageid: <>
2021-04-13 19:50:18shreyanavigyanlinkissue43833 messages
2021-04-13 19:50:18shreyanavigyancreate