micropython

tests/attributes_class_from_other_class_via_self.py

438:b547786f38c7
2011-07-02 Paul Boddie Moved some code generation methods into a new Assembler class. Separated sequence element storage into a separate method which may form the basis of a native library routine.
     1 #!/usr/bin/env python     2      3 class C:     4     def f(self):     5         return 1     6      7 class D:     8     f = C.f     9     10     def g(self, c):    11         m = self.f    12         return m(c)    13     14 c = C()    15 d = D()    16 result_1 = d.g(c)    17     18 # vim: tabstop=4 expandtab shiftwidth=4