Code: Select all
>>> def a(x=0,y=0,z=0):
... print x
... print y
... print z
...
>>> a(3,2,4)
3
2
4
>>> a()
0
0
0
Code: Select all
>>> a(z=3)
0
0
3
This has just saved me lots of time, for a complicated messy method I'm calling.
Code: Select all
>>> def a(x=0,y=0,z=0):
... print x
... print y
... print z
...
>>> a(3,2,4)
3
2
4
>>> a()
0
0
0
Code: Select all
>>> a(z=3)
0
0
3