2008-08-17 | Paul Boddie | file changeset files shortlog | Attempted to define the RSVP instructions more thoroughly. Distinguished between the origin of attributes as context and the eventual context likely to be used in a running program. Attempted to apply attribute context compatibility tests when loading and storing/defining attributes. |
paul@43 | 1 | #!/usr/bin/env python |
paul@43 | 2 | |
paul@43 | 3 | class C: |
paul@43 | 4 | clsattr = 123 |
paul@43 | 5 | |
paul@43 | 6 | def __init__(self, value): |
paul@43 | 7 | self.instattr = value |
paul@91 | 8 | self.clsattr |
paul@91 | 9 | |
paul@91 | 10 | def update(self, value): |
paul@91 | 11 | self.attr = value |
paul@106 | 12 | C.clsattr |
paul@43 | 13 | |
paul@86 | 14 | C |
paul@86 | 15 | C.clsattr |
paul@86 | 16 | |
paul@43 | 17 | # vim: tabstop=4 expandtab shiftwidth=4 |