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 pablogsal
Recipients aldwinaldwin, miss-islington, ned.deily, nedbat, p-ganssle, pablogsal, scoder, serhiy.storchaka, xtreak
Date 2019-07-05.20:57:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1562360260.25.0.522896039917.issue37500@roundup.psfhosted.org>
In-reply-to
Content
>Before this change, code could have had an unreported SyntaxError, but it was code that was being discarded by the optimizer anyway

if __debug__ can a valid form of if 0 and therefore any syntax error will not be reported until that branch becomes true.

> How many people are benefiting from those SyntaxErrors?

I don't know how to give numbers, but is a matter of correctness. SyntaxErrors are reported without the need to execute any code (is a parse error) and should be reported independently of bytecode and what code runs or does not run. Is a property of the code being written, not of the code being executed. 

> Have users of the language been complaining that they don't see SyntaxErrors in their optimized-away code?

Yes, I have seen many people surprised by this. Paul Ganssle (added to the noisy list) was one of the latest ones. Also, is a matter of correctness, is a syntax error and should be reported.

>If we keep this change, I will hear from people unhappy with the drop in their coverage measurement.  Have users of the language been complaining that they don't see SyntaxErrors in their optimized-away code?

I am very sorry that this change affects your users in a negative way. But I think you were relying on an implementation detail of the interpreter that was never assured to have backwards compatibility.
History
Date User Action Args
2019-07-05 20:57:40pablogsalsetrecipients: + pablogsal, scoder, nedbat, ned.deily, serhiy.storchaka, p-ganssle, miss-islington, xtreak, aldwinaldwin
2019-07-05 20:57:40pablogsalsetmessageid: <1562360260.25.0.522896039917.issue37500@roundup.psfhosted.org>
2019-07-05 20:57:40pablogsallinkissue37500 messages
2019-07-05 20:57:39pablogsalcreate