micropython

tests/call_func_default_global_multiple.py

440:cf329206154e
2011-07-03 Paul Boddie Introduced constant usage tracking.
     1 #!/usr/bin/env python     2      3 d = 4     4      5 i = 0     6 l = []     7      8 while i < 3:     9     def f(a, b, c=d):    10         return c    11     l.append(f)    12     i += 1    13     14 f0 = l[0]    15 f1 = l[1]    16 f2 = l[2]    17     18 result0_3 = f0(1, 2, 3)    19 result1_3 = f1(1, 2, 3)    20 result2_3 = f2(1, 2, 3)    21 result0_4 = f0(1, 2)    22 result1_4 = f1(1, 2)    23 result2_4 = f2(1, 2)    24     25 # vim: tabstop=4 expandtab shiftwidth=4