tests/nested_value_changed.py | raw changeset files shortlog |
1.1 --- a/tests/nested_value_changed.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 - y = 2 # used to initialise h 1.9 - def h(z): 1.10 - return x, y, z, a 1.11 - y = 5 # Python uses this value directly from g in h 1.12 - return h 1.13 - return g 1.14 - 1.15 -result = f(1)()(3) 1.16 -assert result == (1, 2, 3, 4) # (1, 5, 3, 4) in Python