Pablo Galindo Salgado <pablog...@gmail.com> added the comment:
>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. ---------- nosy: +p-ganssle _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37500> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com