New submission from Albert Hopkins <[EMAIL PROTECTED]>:
Say I have module foo.py:
def a(x):
def b():
x
del x
If I run foo.py under Python 2.4.4 I get:
File "foo.py", line 4
del x
SyntaxError: can not delete variable 'x' referenced in nested
scope
Under Python 2.6 and Python 3.0 I get:
SyntaxError: can not delete variable 'x' referenced in nested
scope
The difference is under Python 2.4 I get a traceback with the lineno and
offending line, but I do not get a traceback in Pythons 2.6 and 3.0.
This also kinda relates to the 2to3 tool. See:
http://groups.google.com/group/comp.lang.python/browse_frm/thread/a6600c80f8c3c60c/4d804532ea09aae7
----------
components: Interpreter Core
messages: 77443
nosy: marduk
severity: normal
status: open
title: Can't figure out where SyntaxError: can not delete variable 'x'
referenced in nested scope us coming from in python shows no traceback
type: behavior
versions: Python 2.6, Python 3.0
_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4613>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com