tests/private.py | raw changeset files shortlog |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/tests/private.py Sun Jan 07 20:09:39 2007 +0100 1.3 @@ -0,0 +1,19 @@ 1.4 +class A: 1.5 + __x = 3 1.6 + def f(self): 1.7 + print self.__x 1.8 + 1.9 +class B(A): 1.10 + __x = 4 1.11 + 1.12 +class C(B): 1.13 + __x = 5 1.14 + def f(self): 1.15 + print self.__x 1.16 + 1.17 +a = A() 1.18 +a.f() 1.19 +b = B() 1.20 +b.f() 1.21 +c = C() 1.22 +c.f()