You can, but you have to override __new__
which is called implicitly before __init__
:
class Z(X):
def __new__(cls, a, b, c, d):
self = super(Z, cls).__new__(cls, a, b, c)
self.d = d
return self
>>> z = Z(1, 2, 3, 4)
>>> z
Z(a=1, b=2, c=3)
>>> z.d
4
But d
will be just an independent attribute!
>>> list(z)
[1, 2, 3]