tests/changed_globals_function.py | raw changeset files shortlog |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/tests/changed_globals_function.py Wed Jul 04 00:27:29 2012 +0200 1.3 @@ -0,0 +1,22 @@ 1.4 +#!/usr/bin/env python 1.5 + 1.6 +class C: 1.7 + p = 123 1.8 + 1.9 +class D: 1.10 + p = 456 1.11 + 1.12 +x = C 1.13 + 1.14 +def change(): 1.15 + global x 1.16 + x = D 1.17 + 1.18 +def f(): 1.19 + return x.p 1.20 + 1.21 +change() 1.22 +result1_456 = x.p 1.23 +result2_456 = f() 1.24 + 1.25 +# vim: tabstop=4 expandtab shiftwidth=4