Re: [Tutor] difference between super() and parent.__init__()?

2011-10-21 Thread Steven D'Aprano
Alex Hall wrote: On 10/21/11, Steven D'Aprano wrote: [...] The one exception to this is if your class changes the method signature. E.g. if A.method takes no arguments, but B.method requires an argument. super cannot help you now. But changing the signature of methods is almost always the wron

Re: [Tutor] difference between super() and parent.__init__()?

2011-10-21 Thread Alex Hall
On 10/21/11, Steven D'Aprano wrote: > Alex Hall wrote: >> Hi all, >> I am just curious: I have seen classes that are subclasses initialize >> their parents through both super and parentClass.__init__. What is the >> difference, if any, and is one "better" or "more pythonic" than the >> other? > >

Re: [Tutor] difference between super() and parent.__init__()?

2011-10-21 Thread Steven D'Aprano
Alex Hall wrote: Hi all, I am just curious: I have seen classes that are subclasses initialize their parents through both super and parentClass.__init__. What is the difference, if any, and is one "better" or "more pythonic" than the other? A simple question with a complicated answer... Firs

[Tutor] difference between super() and parent.__init__()?

2011-10-21 Thread Alex Hall
Hi all, I am just curious: I have seen classes that are subclasses initialize their parents through both super and parentClass.__init__. What is the difference, if any, and is one "better" or "more pythonic" than the other? -- Have a great day, Alex (msg sent from GMail website) mehg...@gmail.com