micropython

Change of tests/class_class_attr_indirect_in_function.py

641:89eed32aeed3
tests/class_class_attr_indirect_in_function.py syspython-as-target
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tests/class_class_attr_indirect_in_function.py	Wed Mar 20 00:05:37 2013 +0100
     1.3 @@ -0,0 +1,23 @@
     1.4 +#!/usr/bin/env python
     1.5 +
     1.6 +class A:
     1.7 +    pass
     1.8 +
     1.9 +class B(A):
    1.10 +    pass
    1.11 +
    1.12 +class C:
    1.13 +    pass
    1.14 +
    1.15 +def f(x):
    1.16 +    return x.__class__
    1.17 +
    1.18 +a = f(A)
    1.19 +b = f(B)
    1.20 +c = f(C)
    1.21 +
    1.22 +result_1 = a is type and 1 or 0
    1.23 +result_2 = b is type and 2 or 0
    1.24 +result_3 = c is type and 3 or 0
    1.25 +
    1.26 +# vim: tabstop=4 expandtab shiftwidth=4