micropython

tests/cond_if.py

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 #!/usr/bin/env python     2      3 a = 1     4 if a:     5     b = 1     6 else:     7     b = 2     8 a     9 b    10     11 # vim: tabstop=4 expandtab shiftwidth=4