Re: Overloading __init__ & Function overloading
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: Overloading __init__ & Function overloading

From: Fredrik Lundh <fredrik@pythonware.com>
Date: Fri Sep 30 2005 - 17:59:32 CEST

"Iyer, Prasad C" wrote:

> Thanks a lot for the reply.
> But I want to do something like this
>
> class BaseClass:
> def __init__(self):
> # Some code over here
> def __init__(self, a, b):
> # Some code over here
> def __init__(self, a, b, c):
> # some code here

did you read the FAQ I pointed you to? it shows how to deal with exactly
that case.

</F>
Received on Sat Oct 15 04:00:29 2005