micropython

Annotated tests/getattr_class.py

671:76bdd4381b66
2013-07-04 Paul Boddie Fixed operator and built-in function invocations to use the "apply" function. Added a proper translation of print statements. syspython-as-target
paul@412 1
#!/usr/bin/env python
paul@412 2
paul@412 3
class C:
paul@412 4
    x = 1
paul@412 5
paul@412 6
class D:
paul@412 7
    x = 2
paul@412 8
paul@412 9
result_1 = getattr(C, "x")
paul@412 10
result_2 = getattr(D, "x")
paul@412 11
paul@412 12
# vim: tabstop=4 expandtab shiftwidth=4