2009-06-08 | Paul Boddie | file changeset files shortlog | Introduced the removal of all explicitly defined methods from removed classes in the InspectedModule.vacuum method when applying optimisations. Added notes about exceptions, statistics about program size, and comments about functions as methods. |
paul@136 | 1 | #!/usr/bin/env python |
paul@136 | 2 | |
paul@136 | 3 | class C: |
paul@136 | 4 | def f(self, a, b, c): |
paul@208 | 5 | self.a = a |
paul@208 | 6 | self.b = b |
paul@208 | 7 | self.c = c |
paul@136 | 8 | |
paul@136 | 9 | c = C() |
paul@136 | 10 | |
paul@136 | 11 | f = C.f |
paul@136 | 12 | f(c, 1, 2, 3) # test self argument |
paul@230 | 13 | result_1 = c.a |
paul@230 | 14 | result_2 = c.b |
paul@230 | 15 | result_3 = c.c |
paul@136 | 16 | |
paul@136 | 17 | # vim: tabstop=4 expandtab shiftwidth=4 |