According to the documentation,
Return a proxy object that delegates method calls to a parent or sibling class of type.
The closest answer to what I need is found here:
Just like
int()orstr()or any of the other built-in types, the type of the object returned by callingsuper()is that type.
My interpretation is, super() returns an object of the specified type. However, I'm not sure why the term 'proxy' is used, does it have to the with the design pattern named 'proxy'? For example,
class Contact:
def __init__(self, phone, email):
self.phone = phone
self.email = email
class Friend(Contact):
def __init__(self, name, phone, email):
self.name = name
super().__init__(phone, email)
For this case, as far as I'm concerned, super().__init__(phone, email) is equivalent to using Contact.__init__(self, phone, email). That is, an instance of Contact is returned from super() for which we define a new attribute name, but I don't see how it would relate to that design pattern.