micropython

Change of tests/attribute_usage_specific.py

489:ff111356187d
tests/attribute_usage_specific.py
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tests/attribute_usage_specific.py	Mon Mar 05 00:25:11 2012 +0100
     1.3 @@ -0,0 +1,23 @@
     1.4 +#!/usr/bin/env python
     1.5 +
     1.6 +class A:
     1.7 +    def f(self, x):
     1.8 +        return 0
     1.9 +    def g(self, y):
    1.10 +        return 2
    1.11 +
    1.12 +class B:
    1.13 +    def g(self, z):
    1.14 +        return 4
    1.15 +
    1.16 +def f(x, y):            # x : A, B
    1.17 +    result = x.g(1)
    1.18 +    while y:            # x : A only
    1.19 +        y = x.f(1)
    1.20 +    return result
    1.21 +
    1.22 +a = A()
    1.23 +b = B()
    1.24 +result_2 = f(a, 1)
    1.25 +
    1.26 +# vim: tabstop=4 expandtab shiftwidth=4