I have a class that inherits from int, in my class init function I am not calling the parent init function, but still somehow there is a value when I use the parent (int) methods, which means I think that the parent init was also called?
for example:
class NumberWithCall(int):
def __init__(self, number):
pass
print(NumberWithCall(8))
will return 8
I thought that maybe the parent constructor is called implicitly, but in this code I saw it is not:
class parent:
def __init__(self):
print("in parent init")
class son(parent):
def __init__(self):
print("in son init")
son()
will return: in son init