Overloaded Constructors?!?

2005-03-20 Thread andrea_gavana
there a way to achieve the same thing in Python/wxPython? Someone else has talked about overloaded constructors, but I don't have any idea on how to implement this kind of "constructors" in Python. Does anyone have a small example of overloaded constructors in Python? I have no idea

Overloaded Constructors?!?

2005-03-20 Thread andrea_gavana
Hello Kent, thank you a lot for your answer. I was starting to think that my question was a little bit strange to obtain an answer... >This is a strange design. My first reaction is, why do you want to do that? Maybe you >should split the class in two? You are right. The problem is that this

Re: Overloaded Constructors?!?

2005-03-20 Thread Kent Johnson
[EMAIL PROTECTED] wrote: Hello NG, I am trying to port a useful class from wxWidgets (C++) to a pure Python/wxPython implementation. In the C++ source code, a unique class is initialized with 2 different methods (???). This is what it seems to me. I have this declarations: class wxFoldWindowI

Re: Overloaded Constructors?!?

2005-03-20 Thread Michael Spencer
[EMAIL PROTECTED] wrote: [trying to create a single Python class with the equivalent of the following overloaded constructors] wxFoldWindowItem(wxWindow *wnd, int flags = wxFPB_ALIGN_WIDTH, int ySpacing = wxFPB_DEFAULT_YSPACING, int leftSpacing

Re: Overloaded Constructors?!?

2005-03-20 Thread Shalabh Chaturvedi
initializations refers to completely different objects (the first one is a wx.Window, the second one is an horizontal line). Does anyone know if is there a way to achieve the same thing in Python/wxPython? Someone else has talked about overloaded constructors, but I don't have any idea on h

Re: Overloaded Constructors?!?

2005-03-20 Thread Paul McGuire
>>Another way is to make two factory methods that >>create instances of the class and do the correct initialization. >I am sorry to be so tedious, but I am still quite a >newbie in Python... could you please provide a very >small example of your last sentence? Looks >quite interesting... See the