tests/nested_bad_python.py | raw changeset files shortlog |
1.1 --- a/tests/nested_bad_python.py Thu Sep 08 21:36:58 2016 +0200 1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 1.3 @@ -1,13 +0,0 @@ 1.4 -a = 4 1.5 - 1.6 -def f(x): 1.7 - def g(): 1.8 - def h(z): 1.9 - return x, y, z, a 1.10 - h(3) # NameError in Python 1.11 - y = 2 # not available for h, detected during inspection 1.12 - return h 1.13 - return g 1.14 - 1.15 -result = f(1)()(3) 1.16 -assert result == (1, 2, 3, 4)