circuitpython/tests/basics/fun_callstardblstar.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

18 lines
388 B
Python

# test calling a function with *tuple and **dict
def f(a, b, c, d):
print(a, b, c, d)
f(*(1, 2), **{'c':3, 'd':4})
f(*(1, 2), **{['c', 'd'][i]:(3 + i) for i in range(2)})
# test calling a method with *tuple and **dict
class A:
def f(self, a, b, c, d):
print(a, b, c, d)
a = A()
a.f(*(1, 2), **{'c':3, 'd':4})
a.f(*(1, 2), **{['c', 'd'][i]:(3 + i) for i in range(2)})