micropython

Annotated tests/shadow_class_global_reassign.py

634:c1c95a183e21
2013-01-14 Paul Boddie Moved common logic into a separate method.
paul@342 1
#!/usr/bin/env python
paul@342 2
paul@342 3
def f(self, x):
paul@342 4
    return x
paul@342 5
paul@342 6
class C:
paul@342 7
    e = f
paul@342 8
paul@342 9
    def f(self, x):
paul@342 10
        return 3
paul@342 11
paul@342 12
c = C()
paul@342 13
result_3 = c.f(1)
paul@342 14
paul@342 15
# vim: tabstop=4 expandtab shiftwidth=4