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@189 | 1 | #!/usr/bin/env python |
paul@189 | 2 | |
paul@189 | 3 | def f(a, b, c): |
paul@211 | 4 | return b |
paul@189 | 5 | |
paul@211 | 6 | def h(a, b, c=f(5, 4, 3)): |
paul@189 | 7 | return c |
paul@189 | 8 | |
paul@211 | 9 | x = h(1, 2, 3) # -> 3 |
paul@211 | 10 | y = h(1, 2) # -> 4 |
paul@189 | 11 | |
paul@189 | 12 | # vim: tabstop=4 expandtab shiftwidth=4 |