micropython

tests/failure/shadow_class_global_reassign.py

803:39ba98ecc020
2014-06-01 Paul Boddie Fixed a docstring to describe the method's actual return value. syspython-as-target
     1 #!/usr/bin/env python     2      3 def f(self, x):     4     return x     5      6 class C:     7     i = 2     8      9     while i > 0:    10         e = f # right hand side name changes origin    11     12         def f(self, x):    13             return 3    14     15         i -= 1    16     17 c = C()    18 result_3 = c.f(1)    19     20 # vim: tabstop=4 expandtab shiftwidth=4