micropython

Annotated tests/call_method_ref.py

635:74ad0468297b
2013-01-15 Paul Boddie Added support for multiple class definitions in the same namespace with the same name. Made classes attribute users.
paul@134 1
#!/usr/bin/env python
paul@134 2
paul@134 3
class C:
paul@134 4
    def f(self, a, b, c):
paul@208 5
        self.a = a
paul@208 6
        self.b = b
paul@208 7
        self.c = c
paul@134 8
paul@134 9
c = C()
paul@134 10
paul@134 11
f = c.f
paul@134 12
f(1, 2, 3)
paul@230 13
result_1 = c.a
paul@230 14
result_2 = c.b
paul@230 15
result_3 = c.c
paul@134 16
paul@134 17
# vim: tabstop=4 expandtab shiftwidth=4