"wesley chun" wrote
a very popular idiom you'll see in function signatures looks like
this:
def func(*args, **kwargs)
this is the most flexible Python function definition because this
function can accept *any* number and type of arguments you can give
But the caveat: With power comes resp
On Wed, Jan 7, 2009 at 7:01 PM, bob gailer wrote:
> Mr Gerard Kelly wrote:
>>
>> How can you make a function accept a variable number of inputs without
>> any particular limit?
>>:
>> But what if you want to be able to call the function and put in as many
>> arguments as you want.
>
> def
Mr Gerard Kelly wrote:
How can you make a function accept a variable number of inputs without
any particular limit?
Like when you define a function you usually go:
def func(a,b,c,d,e)
and if you want to give a default value for e you can use e=0 for example.
But what if you want to be able to
How can you make a function accept a variable number of inputs without
any particular limit?
Like when you define a function you usually go:
def func(a,b,c,d,e)
and if you want to give a default value for e you can use e=0 for example.
But what if you want to be able to call the function and pu