I came across the following python code in which a class inherits from two parent classes. I am trying to understand the constructor of the class.
# wrapper.py:
#############
class EWrapper:
def __init__(self):
pass
...
# client.py
###########
class EClient(object):
def __init__(self, wrapper):
self.msg_queue = queue.Queue()
self.wrapper = wrapper
self.decoder = None
self.reset()
....
# Test.py
#########
class TestApp(EWrapper, EClient):
def __init__(self):
EClient.__init__(self, self)
Could someone kindly shed more light on EClient.__init__(self, self)? It's not clear to me the usage of two selfs. How does python know which self is which?
What is the process of constructing an object of TestApp?