Should one always add super().__init__() to the __init__?

Ramchandra Apte maniandram01 at gmail.com
Sun Sep 30 00:55:11 EDT 2012


On Sunday, 30 September 2012 09:53:45 UTC+5:30, Steven D'Aprano  wrote:
> On Sat, 29 Sep 2012 20:14:10 -0700, Ramchandra Apte wrote:
> 
> 
> 
> > I forgot something:
> 
> > I meant super().__init__() or similar
> 
> 
> 
> What about it? Please try to remember that we can't read your mind and 
> 
> don't know what you are thinking, we can only work from what you put in 
> 
> writing.
> 
> 
> 
> There is no difference between super(Class, self).__init__ and 
> 
> super().__init__ except that the second version only works in Python 3.
> 
> 
> 
> 
> 
> 
> 
> -- 
> 
> Steven

When I said "super().__init__()" it could have been "super().__init__(size+67)" or whatever arguments are needed for __init__



More information about the Python-list mailing list