2008-07-19 | Paul Boddie | raw annotate files changeset graph | Made methods to handle assignment expression values. Changed constant storage optimisations to consider sources. Introduced distinctions between some storage operations which use the current value (StoreTemp, StoreFrame, StoreResult) and others which use a source defined in a full assignment operation. Made class attribute assignment via self forbidden (removing StoreAddressContext). Added an unused results optimisation. Fixed attribute_load_instructions references. Improved instruction string representations to show source details where no inputs are defined. Made a failure version of the attributes test. |
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