tests/cmdline/cmd_showbc.py: Fix test to explicitly declare nonlocal.

The way it was written previously the variable x was not an implicit
nonlocal, it was just a normal local (but the compiler has a bug which
incorrectly makes it a nonlocal).
This commit is contained in:
Damien George 2018-10-26 16:36:29 +11:00
parent 746dbf78d3
commit c2074e7b66
1 changed files with 1 additions and 1 deletions

View File

@ -108,7 +108,7 @@ def f():
# closed over variables # closed over variables
x = 1 x = 1
def closure(): def closure():
a = x + 1 nonlocal x; a = x + 1
x = 1 x = 1
del x del x