summaryrefslogtreecommitdiff
path: root/tests/cmdline/cmd_showbc.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2018-10-26 16:36:29 +1100
committerDamien George <damien.p.george@gmail.com>2018-10-27 23:57:14 +1100
commitc2074e7b66a042492604fbf9ea80b71cdf848e93 (patch)
tree6ece2379e19cae9c9e2e57bc00585cb2ec3e78aa /tests/cmdline/cmd_showbc.py
parent746dbf78d3067f32c8885217d53ff9231dac3772 (diff)
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).
Diffstat (limited to 'tests/cmdline/cmd_showbc.py')
-rw-r--r--tests/cmdline/cmd_showbc.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/cmdline/cmd_showbc.py b/tests/cmdline/cmd_showbc.py
index 6e99fc418..916228356 100644
--- a/tests/cmdline/cmd_showbc.py
+++ b/tests/cmdline/cmd_showbc.py
@@ -108,7 +108,7 @@ def f():
# closed over variables
x = 1
def closure():
- a = x + 1
+ nonlocal x; a = x + 1
x = 1
del x