micropython

tests/op_iadd.py

519:814bd122d84d
2012-06-04 Paul Boddie Updated the documentation to reflect class attribute assignment policies. Added tests to demonstrate class attribute rebinding.
     1 #!/usr/bin/env python     2      3 def f(a, b):     4     a += b     5     return a     6      7 a = 1     8 b = 2     9 a += b    10 result_3 = a    11 result_4 = f(b, 2)    12 result_2 = b    13     14 # vim: tabstop=4 expandtab shiftwidth=4