DAGDA SEARCH | Back to results | Support

Message 386142 - Python tracker

Source: https://bugs.python.org/msg386142

homepage

Message386142 ➜

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 Mark.Shannon
Recipients Mark.Shannon, Mohamed_Atef, ethan.furman, gregory.p.smith, gvanrossum, josh.r, pablogsal, serhiy.storchaka, stestagg
Date 2021-02-02.14:06:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1612274766.35.0.668530997596.issue42899@roundup.psfhosted.org>
In-reply-to
Content
It isn't a specific optimization at all, but the combination of several.
I will change the behavior to match what appears to be the consensus.

BUT, we need to define what the semantics should be. Otherwise implementing the compiler is just guesswork.


As for a definition of what is legal, the best I can come up with is:

"Repeated bool() checks of a value in short-circuiting expressions ('and' and 'or') may be eliminated if the result can be deduced using boolean algebra."
History
Date User Action Args
2021-02-02 14:06:06Mark.Shannonsetrecipients: + Mark.Shannon, gvanrossum, gregory.p.smith, ethan.furman, serhiy.storchaka, josh.r, Mohamed_Atef, pablogsal, stestagg
2021-02-02 14:06:06Mark.Shannonsetmessageid: <1612274766.35.0.668530997596.issue42899@roundup.psfhosted.org>
2021-02-02 14:06:06Mark.Shannonlinkissue42899 messages
2021-02-02 14:06:06Mark.Shannoncreate
Supported by The Python Software Foundation,
Powered by Roundup Copyright © 1990-2022, Python Software Foundation
Legal Statements