2010-06-05 | Paul Boddie | file changeset files shortlog | Changed parameter initialisation to explicitly use Instance() instead of None. Made the default parameter value code use the same mechanisms as other attribute-setting code. Added tests of lambdas and nested functions with locally defined defaults. |
paul@182 | 1 | #!/usr/bin/env python |
paul@182 | 2 | |
paul@182 | 3 | class C: |
paul@182 | 4 | def __call__(self): |
paul@229 | 5 | return 42 |
paul@182 | 6 | |
paul@182 | 7 | c = C() |
paul@229 | 8 | result_42 = c() |
paul@182 | 9 | |
paul@182 | 10 | # vim: tabstop=4 expandtab shiftwidth=4 |