2008-06-21 | Paul Boddie | file changeset files shortlog | Added support for the detection of module attribute assignment. Added some more tests of module assignment. Introduced better system path initialisation based on the program being inspected. |
paul@59 | 1 | #!/usr/bin/env python |
paul@59 | 2 | |
paul@59 | 3 | class C: |
paul@59 | 4 | def f(self, a, b, c): |
paul@86 | 5 | self.g(a) |
paul@87 | 6 | m = self.g |
paul@87 | 7 | m(b) |
paul@86 | 8 | |
paul@86 | 9 | def g(self, x): |
paul@86 | 10 | C.h(self, x) |
paul@86 | 11 | |
paul@86 | 12 | def h(self, p): |
paul@59 | 13 | pass |
paul@59 | 14 | |
paul@59 | 15 | c = C() |
paul@59 | 16 | c.f(1, 2, 3) |
paul@59 | 17 | |
paul@59 | 18 | f = c.f |
paul@59 | 19 | f(1, 2, 3) |
paul@59 | 20 | |
paul@59 | 21 | # vim: tabstop=4 expandtab shiftwidth=4 |