2008-06-07 | Paul Boddie | raw annotate files changeset graph | Renamed the node attribute to astnode in order to avoid attribute naming conflicts with the compiler.ast classes. Improved default argument loading by using LoadAddress. Added some documentation to the inspect module. Changed the inspection process so that instance attributes are detected in all methods belonging to a class, not just the __init__ method. Changed constant definition so that constants are not redefined using new objects. Fixed attribute assignment during inspection to respect the presence of class attributes when considering possible instance attribute assignment. Added a name function to the micropython.rsvp module in order to simplify __repr__ methods. Added more tests. |
1 #!/usr/bin/env python 2 3 class A: 4 def __init__(self, x): 5 self.x = x 6 7 def a(self): 8 pass 9 10 class B(A): 11 def b(self): 12 pass 13 14 class C(A, B): 15 def a(self): 16 pass 17 18 def b(self): 19 pass 20 21 def __init__(self, x, y): 22 self.x = x 23 self.y = y 24 25 class D: 26 def __init__(self, y): 27 self.y = y 28 29 class E(C, D): 30 pass 31 32 class F(A, D): 33 pass 34 35 # vim: tabstop=4 expandtab shiftwidth=4