[Tutor] calling a function with a variable number of arguments

Eur van Andel eur at fiwihex.nl
Wed Nov 12 06:32:06 EST 2003


Hi

Am I correct in assuming that a function:

def funct_1(a0, a1=1, a2=2)

can be called with either 1, 2 or 3 arguments?
And if I call it:

funct_1(4, 4)

a2 will stay 2?
And so to modify the default value for a2, three arguments are needed?

Where can I find this in the manual?


--
Ir. E.E. van Andel, Fine Wire Heat Exchangers, Fiwihex B.V. www.fiwihex.com
Wierdensestraat 74, NL-7604 BK  Almelo, The Netherlands   eur at fiwihex.nl
phone +31-546-491106  fax +31-546-491107  mobile +31-653-286573  



More information about the Tutor mailing list