You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
316 B
17 lines
316 B
# test calling a function with keywords given by **dict
|
|
|
|
def f(a, b):
|
|
print(a, b)
|
|
|
|
f(1, **{'b':2})
|
|
f(1, **{'b':val for val in range(1)})
|
|
|
|
# test calling a method with keywords given by **dict
|
|
|
|
class A:
|
|
def f(self, a, b):
|
|
print(a, b)
|
|
|
|
a = A()
|
|
a.f(1, **{'b':2})
|
|
a.f(1, **{'b':val for val in range(1)})
|
|
|