New submission from July Tikhonov <july.t...@gmail.com>:

Normal:
>>> compile('1 = 1', '<string>', 'exec')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<string>", line 1
SyntaxError: can't assign to literal

SystemError is raised instead of SyntaxError:
>>> try: abcde
... except NameError:
...  compile('1 = 1', '<string>', 'exec')
... 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'abcde' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 3, in <module>
SystemError: Objects/tupleobject.c:126: bad argument to internal function

Error can be discovered by calling dis.dis('1 = 1').

----------
components: Library (Lib)
messages: 130342
nosy: july
priority: normal
severity: normal
status: open
title: compile() raises SystemError if called from except clause
type: behavior
versions: Python 3.3

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11441>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to