Matthias Bussonnier <[email protected]> added the comment:
Note that with the following example, exec and CommandCompiler return a
different error:
from codeop import CommandCompiler
# identical errors
#exec('1,\\#\n2') SystemError
#CommandCompiler()('1,\\#\n2', symbol='exec') SystemError
# one is syntax the other is System.
exec('a \ \n') # SyntaxError
CommandCompiler()('a \ \n', symbol='exec') # SystemError
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue45738>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com