First, you've misunderstood the class declaration in Python.
This line:
class doWorkWithItems(dueX,dueY,dueZ,...):
should have the class/es to inherit from in the brackets. ie. class doWorkWithItems(object) or class doWorkWithItems(str). So your new class is trying to inherit from all those objects you've passed it.
When you want to pass initialisation parameters you just need to pass them within the __init__ function as you were doing.
class doWorkWithItems(object):
def __init__(self, dueX,dueY,dueZ,..):
As for the best way to have a long list of arguments, Python has an operator for that, it's *. It unpacks a collection of items. It's commonly used with the name args and will allow for any amount of parameters to be passed in.
def __init__(self, *args):
self.args = args
It might be a good idea though, to store these values as a dictionary if they're for different uses, as that's easier to access than a plain list. You can turn the *args into a dictionary pretty easily if you pass every argument as a 2 element tuple like this:
def __init__(self, *args):
try:
self.args = dict(args)
except TypeError:
#What to do if invalid parameters are passed
...
obj = doWorkWithItems( ("Name", "John"), ("Age", 45), ("Occupation", "Professional Example"), )
obj.args
>>> {'Age': 45, 'Name': 'John', 'Occupation': 'Professional Example'}
But there is a better approach you could do if you pass parameters in a dictionary:
def __init__(self, params):
self.name = params.get('name')
self.age = params.get('age')
self.occupation = params.get('occupation')
The .get method will return a key from a dictionary, but if no key is found it will return None. This way all your class's variables can be created even if they're unspecified in parameters, they'll just be set to None. You don't need to access all the attributes through a dictionary, and it handles errors as long as you are passing a dictionary.