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@243 | 1 | #!/usr/bin/env python |
paul@243 | 2 | |
paul@243 | 3 | class D: |
paul@243 | 4 | def __init__(self): |
paul@243 | 5 | self.x = 222 |
paul@243 | 6 | |
paul@243 | 7 | d = D() |
paul@243 | 8 | result_222 = d.x |
paul@243 | 9 | |
paul@243 | 10 | # vim: tabstop=4 expandtab shiftwidth=4 |