fork download
  1. class MyClass:
  2. def __init__(self, *, a=1, b=2, c=3):
  3. self.a = a
  4. self.b = b
  5. self.c = c
  6.  
  7. class MyChildClass(MyClass):
  8. def __init__(self, *, d=4, e=5, **kwargs):
  9. super().__init__(**kwargs)
  10. self.d = d
  11. self.e = e
  12.  
  13. print(MyClass(3).a)
Runtime error #stdin #stdout #stderr 0.14s 23588KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 13, in <module>
TypeError: __init__() takes 1 positional argument but 2 were given