micropython

tests/attributes_class_from_other_class_via_self.py

511:3c26bdc2d8e5
2012-05-29 Paul Boddie Fixed/updated instance attributes definition note.
     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