One way you can do that is by using default arguments.
def my_func (arg1=False, arg2=False, arg3=False):
# Check the arguments.
On Tue, Jun 11, 2013 at 10:54 AM, Arijit Ukil wrote:
> i am writing following python function:
>
> def my_func (arg1, arg2, arg3):
>
> however, I am not always go
On Tue, Jun 11, 2013 at 2:24 PM, Arijit Ukil wrote:
> i am writing following python function:
>
> def my_func (arg1, arg2, arg3):
> however, I am not always going to pass all the arguments. sometimes only
> arg1 is passed, sometimes arg1 and arg2 are passed; sometimes arg1, arg2,
> arg3 are pas
i am writing following python function:
def my_func (arg1, arg2, arg3):
however, I am not always going to pass all the arguments. sometimes only
arg1 is passed, sometimes arg1 and arg2 are passed; sometimes arg1, arg2,
arg3 are passed.
How can i manage this?
Regards,
Arijit Ukil
Tata Consultan