📜  python 类调用基构造函数 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:28.476000             🧑  作者: Mango

代码示例1
class Base(object):
   def __init__(self, value):
       self.value = value

class Child(Base):
   def __init__(self, something_else):
       Base.__init__(value=20)
       self.something_else = something_else