2009-05-23 | Paul Boddie | file changeset files shortlog | Added callable context vs. self argument validation in CheckFrame, plus a test which detects an attempt to fake the self argument with an incompatible instance. |
paul@134 | 1 | #!/usr/bin/env python |
paul@134 | 2 | |
paul@134 | 3 | class C: |
paul@134 | 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@134 | 8 | |
paul@134 | 9 | c = C() |
paul@134 | 10 | |
paul@134 | 11 | f = c.f |
paul@134 | 12 | f(1, 2, 3) |
paul@134 | 13 | |
paul@134 | 14 | # vim: tabstop=4 expandtab shiftwidth=4 |