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 This document describes various compatibility differences between micropython 2 and other Python implementations. 3 4 Class Attribute Assignment 5 -------------------------- 6 7 Python micropython 8 ------ ----------- 9 10 class C: 11 ... 12 13 # cls refers to C 14 15 cls.attr = value Class attribute Run-time error 16 assigned 17 18 Module Attribute Assignment 19 --------------------------- 20 21 Python micropython 22 ------ ----------- 23 24 import somemod 25 26 somemod.attr = value Module attribute Run-time error 27 assigned