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).
pull/4318/head
Damien George 2018-10-26 16:36:29 +11:00
rodzic 746dbf78d3
commit c2074e7b66
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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