micropython

tests/op_add_default.py

212:9cb85e5768fa
2009-05-09 Paul Boddie Added missing funccode to structures. Renamed function_from_method to as_instantiator with naming changes. Added a test of instantiation and keywords.
     1 #!/usr/bin/env python     2      3 def f(a, b, c=a+b):     4     return a + b + c     5      6 a = 10 # used in f default     7 b = 20 # used in f default     8 x = f(1, 2)     9     10 # vim: tabstop=4 expandtab shiftwidth=4