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.
13 lines
185 B
13 lines
185 B
# 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)
|
|
|