2009-05-31 | Paul Boddie | raw annotate files changeset graph | Fixed the structure of "if" statement code. Fixed comparison method definitions for equality and inequality. Added optimisation where exception handlers are pushed and popped without any code defined between these operations. Reviewed exception handling including that employed around operators, introducing PopHandler and ClearException instructions in order to properly maintain exception state. Added RSVP support for some integer comparisons. Split the compare2 test program into separate tests. Added some exception-related documentation. |
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