So I am aware that class methods can be used to "overload" the init method in python, but I'm running into a bit of a problem. Say, for example, I have a constructor like this:
def __init__(self, serviceName, endpoint, exportedInterface, exportedObject, remoteObjectInterface, remoteObjectProxy,
interruptionHandler, invalidationHandler):
self._serviceName = serviceName;
#etc.
@classmethod
def createConnection(cls, serviceName):
return cls(serviceName, None, None, None, None, None, None, None)
Do I really have to list out a value for every single data member in the class method, just to create an instance of the class with a class method? Also, I plan to add more data members to the class later on, but I'm not to happy about having this unwieldy init function with like 15 arguments. Is there a better way to go about this?