I am trying to declare an abstract class A with a constructor with a default behavior: all subclasses must initialize a member self.n:
A
self.n
You can implement something like below :
from abc import ABC class A(ABC): def __init__(self, n): self.n = n super(A,self).__init__()
Instantiating this class would throw an error