[Tutor] Subject: Re: it is ok that object.__init__ gets called multiple times?

Kent Johnson kent37 at tds.net
Thu Jun 12 02:47:48 CEST 2008


On Wed, Jun 11, 2008 at 7:20 PM, claxo <clazzt at arnet.com.ar> wrote:
>>OTOH why are you calling object.__init__() ? I don't think that is
> needed...  >Kent
>
> I dont know what object may do in his __init__ method, so at least calling
> object.__init__(self) seems sensible.  Also, the same page advises against
> not calling object.__init__.

What page is that?

This thread has both points of view:
http://coding.derkeiler.com/Archive/Python/comp.lang.python/2004-12/4599.html

I think if you are using super() then your classes that inherit from
object still need to call super().__init__(). If you are not using
super I don't think it matters.

Kent


More information about the Tutor mailing list