circuitpython/tests/basics/fun_defargs2.py
Damien George 539681fffd tests: Rename test scripts, changing - to _ for consistency.
From now on, all new tests must use underscore.

Addresses issue #727.
2014-07-05 06:14:29 +01:00

20 lines
259 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)
def foo2(a=1, b=2):
print(a, b)
# default and keyword
foo2(b='two')