import inspect def call_parent_init(parent, self, args, kwargs): method = parent.__init__ spec = inspect.getfullargspec(method) if spec.varargs is None: if spec.varkw is None: method(self) else: method(self, **kwargs) else: if spec.varkw is None: method(self, *args) else: # runs upto the following line, and raises an Exception method(self, *args, **kwargs) Base = object class C(Base): def __init__(*args, **kwargs): call_parent_init(Base, args[0], args[1:], kwargs) C(10)