That is correct. Note that you can also call the __init__
method directly on the Base
class, like so:
class Child(Base):
def __init__(self, something_else):
Base.__init__(self, value = 20)
self.something_else = something_else
That's the way I generally do it. But it's discouraged, because it doesn't behave very well in the presence of multiple inheritance. Of course, multiple inheritance has all sorts of odd effects of its own, and so I avoid it like the plague.
In general, if the classes you're inheriting from use super
, you need to as well.