[issue44816] PEP 626 does not explain the handling of constants, at all.

2021-08-03 Thread Brandt Bucher
Brandt Bucher added the comment: Thanks for clarifying. I'm worried, though, that the PEP's emphasis on "*all* lines of code executed and *only* for lines of code that are executed" could be problematic for other optimizations we perform. Consider: if ( # <-- True # <-- ): pass

[issue44816] PEP 626 does not explain the handling of constants, at all.

2021-08-03 Thread Mark Shannon
Mark Shannon added the comment: This isn't a bug. Although PEP 626 is not at all clear about this. The key word in the PEP is "executed". Because compound and multi-line constants are constants, the parts of them are not "executed", but computed at compile time. Having re-read the PEP, this