Re: Overloading __init__ & Function overloading

Discussion in 'Python' started by Fredrik Lundh, Sep 30, 2005.

  1. "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>
    Fredrik Lundh, Sep 30, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steven Bethard
    Replies:
    2
    Views:
    445
    Steven Bethard
    Feb 16, 2005
  2. Iyer, Prasad C

    Overloading __init__ & Function overloading

    Iyer, Prasad C, Sep 30, 2005, in forum: Python
    Replies:
    3
    Views:
    6,394
    Fredrik Lundh
    Sep 30, 2005
  3. Fredrik Lundh
    Replies:
    0
    Views:
    437
    Fredrik Lundh
    Sep 30, 2005
  4. Steve Holden
    Replies:
    0
    Views:
    421
    Steve Holden
    Sep 30, 2005
  5. Iyer, Prasad C
    Replies:
    4
    Views:
    570
    John J. Lee
    Sep 30, 2005
Loading...

Share This Page