Message385050
Sounds great to me (with my approximately zero optimizer experience)
At risk of taking this too far, you /could/ add something like:
"skip any boolean test of a value _immediately_ following another boolean test, when it has no ..."
to this spec/guidance/whatever it is.
Just to prevent the risk of the `if` block being removed in future in ridiculous code like the following:
try:
while True:
a = x or y
a.pop()
if a:
pass
except XIsEmptyError:
...
(I'm guessing we're pretty far from being able to rewrite enough for this to be a remotely credible optimization candidate anytime soon anyway) |
|
Date |
User |
Action |
Args |
2021-01-13 17:33:59 | stestagg | set | recipients:
+ stestagg, gvanrossum, gregory.p.smith, ethan.furman, Mark.Shannon, serhiy.storchaka, josh.r, Mohamed_Atef, pablogsal |
2021-01-13 17:33:59 | stestagg | set | messageid: <1610559239.46.0.0918953527951.issue42899@roundup.psfhosted.org> |
2021-01-13 17:33:59 | stestagg | link | issue42899 messages |
2021-01-13 17:33:59 | stestagg | create | |
|