micropython

Annotated tests/class_class_attr_indirect.py

804:c967b47fada4
2014-06-01 Paul Boddie Merged branches. syspython-as-target
paul@401 1
#!/usr/bin/env python
paul@401 2
paul@401 3
class A:
paul@401 4
    pass
paul@401 5
paul@401 6
class B(A):
paul@401 7
    pass
paul@401 8
paul@401 9
class C:
paul@401 10
    pass
paul@401 11
paul@401 12
a = A.__class__
paul@401 13
b = B.__class__
paul@401 14
c = C.__class__
paul@401 15
paul@401 16
result_1 = a is type and 1 or 0
paul@401 17
result_2 = b is type and 2 or 0
paul@401 18
result_3 = c is type and 3 or 0
paul@401 19
paul@401 20
# vim: tabstop=4 expandtab shiftwidth=4