micropython

tests/attributes_class_from_other_class_via_self.py

510:41b26d6cd7ea
2012-05-21 Paul Boddie Expanded the documentation, adding prerequisites, reports and roadmap sections. Updated the copyright information.
     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