12 months ago | Paul Boddie | file changeset files shortlog | Fixed low-level attribute initialisation, avoiding object copying tests. | value-replacement |
paul@557 | 1 | class C: |
paul@557 | 2 | def f(self, x, y, z): |
paul@557 | 3 | return z |
paul@557 | 4 | |
paul@557 | 5 | class D: |
paul@557 | 6 | def f(self, a, b, c): |
paul@557 | 7 | return c |
paul@557 | 8 | |
paul@557 | 9 | def pqr(obj): |
paul@557 | 10 | return obj.f(1, 2, r=3) # no corresponding function |
paul@557 | 11 | |
paul@557 | 12 | c = C() |
paul@557 | 13 | d = D() |
paul@557 | 14 | |
paul@557 | 15 | print pqr(c) # should fail |