python class call base constructor

Solutions on MaxInterview for python class call base constructor by the best coders in the world

showing results for - "python class call base constructor"
Giorgia
13 Jan 2019
1class Base(object):
2   def __init__(self, value):
3       self.value = value
4
5class Child(Base):
6   def __init__(self, something_else):
7       Base.__init__(value=20)
8       self.something_else = something_else