micropython

Annotated tests/lambda_defaults.py

685:5f2c0e22fd40
2013-10-08 Paul Boddie Fixed relative import path interpretation to work within package roots. syspython-as-target
paul@234 1
#!/usr/bin/env python
paul@234 2
paul@234 3
add_2 = lambda a, b=2: a + b
paul@234 4
paul@234 5
def g(f, x):
paul@234 6
    return f(x)
paul@234 7
paul@234 8
result_3 = add_2(1)
paul@234 9
result2_3 = g(add_2, 1)
paul@234 10
paul@234 11
# vim: tabstop=4 expandtab shiftwidth=4