[issue31161] Only check for print and exec parentheses cases for SyntaxError, not subclasses

Steven D'Aprano report at bugs.python.org
Sat Aug 12 20:21:13 EDT 2017


Steven D'Aprano added the comment:

> > Perhaps the check needs to be limited to just the exact type.
> Looks reasonable to me. Do you want to provide a PR Martijn?

You realise that is making the current traceback *less* informative 
instead of more informative? I think that's going backwards -- useful 
information about the syntax errors are being discarded. "Practicality 
beats purity" -- the current behaviour is helpful, even if it mixes 
information about two errors into one traceback.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue31161>
_______________________________________


More information about the Python-bugs-list mailing list