[issue19335] IDLE over-enthusiastically verifies 'nonlocal' usage
Terry J. Reedy
report at bugs.python.org
Mon Oct 21 22:36:30 CEST 2013
Terry J. Reedy added the comment:
This started as a python-list thread. On that thread, Peter Otten verified the behavior on Linux, so it is not specific to the Windows pythonw executable. He also verified on 3.2 (which gets security fixes only) and 3.4. I just checked 2.7. On that thread, I verified a) the three lines submitted by themselves as a file cause the same error message, as they should ("must refer to pre-existing bindings in an enclosing scope ") and b) Python in interactive mode syntax-checks lines as entered, even for compound statements. I just verified that Idle behaves the same when started with -n (no subprocess):
C:\Programs\Python33>python -m idlelib.idle -n
Summary: Idle acts as if it syntax-checks the cumulative input instead of just the line entered. (But I have not looked as the code.)
The three lines constitute a test if they can be run from a test file.
----------
nosy: +terry.reedy
stage: -> needs patch
versions: +Python 2.7, Python 3.4 -Python 3.2
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19335>
_______________________________________
More information about the Python-bugs-list
mailing list