If I run this code:
class Super:
def __init__(self, name):
self.name = name
class Sub(Super):
def publ(self):
print("works")
a = Sub()
as planned it succesfully fails with this message:
TypeError: __init__() takes exactly 2 arguments (1 given)
but it gives me bugging question:
Where the information is stored about Sub class requirement for the argument entry? I mean how SUB() knows that it needs "name" as the argument? What is mechanism defining how it inherits "that knowledge" from Super().