2009-05-24 | Paul Boddie | file changeset files shortlog | Changed the interface to functions and instantiators to expose the body block (after argument checking) instead of an explicit location. |
paul@43 | 1 | #!/usr/bin/env python |
paul@43 | 2 | |
paul@43 | 3 | class C: |
paul@43 | 4 | clsattr = 123 |
paul@91 | 5 | |
paul@219 | 6 | def __init__(self, value=None): |
paul@219 | 7 | self.instattr = value is None and self.clsattr or value |
paul@43 | 8 | |
paul@219 | 9 | c1 = C(789) |
paul@219 | 10 | c2 = C() |
paul@86 | 11 | |
paul@43 | 12 | # vim: tabstop=4 expandtab shiftwidth=4 |