What does object's __init__() method do in python? [duplicate]
问题 This question already has answers here : What __init__ and self do on Python? (18 answers) Closed 6 years ago . While reading the code of OpenStack and I encountered this. A class named 'Service' inherits the base class 'object', and then in Service's __init__() method, object's __init__ is called. The related code looks like this: the class definition: class Service(object): and Service's init method definition: def __init__(self, host, binary, topic, manager, report_interval=None, periodic