micropython

docs/compatibility.txt

230:892b13f1cba4
2009-05-30 Paul Boddie Changed instantiator invocation reserving a frame slot regardless of whether the target is known in advance. In the instantiator, the first frame slot is then overwritten with the new instance, and the RecoverFrame instruction is no longer required. Instead, a new JumpInFrame instruction maintains the existing locals, jumping to the initialiser method for the class. Updated various tests, renaming and enhancing the classes 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