2007-06-21 | paulb | file changeset files shortlog | Changed the instance fixing to deal more thoroughly with "accesses" annotations. Added a distinct instances cache to _Class. |
paulb@170 | 1 | class A: |
paulb@170 | 2 | __x = 3 |
paulb@170 | 3 | def f(self): |
paulb@170 | 4 | print self.__x |
paulb@170 | 5 | |
paulb@170 | 6 | class B(A): |
paulb@170 | 7 | __x = 4 |
paulb@170 | 8 | |
paulb@170 | 9 | class C(B): |
paulb@170 | 10 | __x = 5 |
paulb@170 | 11 | def f(self): |
paulb@170 | 12 | print self.__x |
paulb@170 | 13 | |
paulb@170 | 14 | a = A() |
paulb@170 | 15 | a.f() |
paulb@170 | 16 | b = B() |
paulb@170 | 17 | b.f() |
paulb@170 | 18 | c = C() |
paulb@170 | 19 | c.f() |