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

Ian Kelly ian.g.kelly at gmail.com
Sat Sep 29 12:59:16 EDT 2012


On Sat, Sep 29, 2012 at 7:27 AM, Ramchandra Apte <maniandram01 at gmail.com> wrote:
> Should one always add super().__init__() to the __init__? The reason for this is the possibility of changing base classes (and forgetting to update the __init__).

As long as the class and its subclasses only use single inheritance,
it makes little difference, so if you think it will reduce the
maintenance burden, I would say go for it.



More information about the Python-list mailing list