2014-02-23 | Paul Boddie | raw files shortlog changelog graph | Added a test of a name taking different scopes in the same unit. | syspython-as-target |
tests/globals_vs_locals.py (file) |
1.1 --- a/tests/globals_vs_locals.py Sun Feb 23 20:26:19 2014 +0100 1.2 +++ b/tests/globals_vs_locals.py Sun Feb 23 20:31:50 2014 +0100 1.3 @@ -9,9 +9,17 @@ 1.4 global b 1.5 b = x 1.6 1.7 +def h(): 1.8 + b = b 1.9 + c = b 1.10 + b = 1 1.11 + return c 1.12 + 1.13 f(3) 1.14 result_2 = b 1.15 g(4) 1.16 -result_4 = b 1.17 +result1_4 = b 1.18 +result2_4 = h() 1.19 +result3_4 = b 1.20 1.21 # vim: tabstop=4 expandtab shiftwidth=4