Using Multiple Constructors

Mikhael Loo mikhael at lib-sys.com
Fri Aug 3 17:04:00 EDT 2001


I just had another Idea,
Perhaps what I need to do is sub class objects that only have constructors.
Is this the best way?

   -Mikhael
"Mikhael Loo" <mikhael at lib-sys.com> wrote in message
news:3b6b0d1e_1 at news.chartertn.net...
> How do you use multiple constructors in a python class.  I'm guesing that
it
> doesn't involve multiple __init__ functions.
>
> Below is my idea but I'm thinking there must be another method that  is
> evading me.
>
> Class MyObject:
>     Constructor1(self, number):
>         pass
>     Constructor2(self, string):
>         pass
>
> Help anyone?
>
>
>
>





More information about the Python-list mailing list