circuitpython/tests/basics/fun-defargs2.py
2014-03-03 23:25:08 +00:00

14 lines
185 B
Python

# overriding default arguments
def foo(a, b=3):
print(a, b)
# override with positional
foo(1, 333)
# override with keyword
foo(1, b=333)
# override with keyword
foo(a=2, b=333)