Re: Overloading __init__ & Function overloading
- From: "Istvan Albert" <istvan.albert@xxxxxxxxx>
- Date: 30 Sep 2005 08:10:54 -0700
in python you can provide default values for your parameters:
class BaseClass:
def __init__(self, a=None):
if a is None:
#no parameter
pass
else:
#one parameter
pass
baseclass1=BaseClass()
baseclass2=BaseClass(1)
.
- References:
- RE: Overloading __init__ & Function overloading
- From: Iyer, Prasad C
- RE: Overloading __init__ & Function overloading
- Prev by Date: Re: Overloading __init__ & Function overloading
- Next by Date: Re: pywordnet install problems
- Previous by thread: Re: Overloading __init__ & Function overloading
- Next by thread: Re: Overloading __init__ & Function overloading
- Index(es):