I have the following code:
def __init__(self, vocable_file_path, xsd_file_path, word_list_file_path):
self.vocable_file_path = vocable_file_path
self.xsd_file_path = xsd_file_path
self.word_list_file_path = word_list_file_path
def add_values_to_attribute_of_vocables (self, attribute_name, attribute_value, words_attribute_name):
... (does the job of adding stuff) ...
Only the add_values_to_attribute_of_vocables
method uses the three parameters set in the constructor. I could move them into the signature of the method quite easily. What stops me from doing that is, that the method signature would get quite long and I am not sure if it is a good practice to do it.
I read the following question here on PSE: How does the concept of a class change when passing data to the constructor instead of method parameters?
It makes me think I should put the parameters into the signature of the method, but I am still not sure, if it's the right thing to do.
This is not a black & white question, if there is something fundamentaly bad about the code or my approach, please say so, thanks.
I can post more code, if wanted, but I think the rest of the code is unrelated and might only clutter this question.
EDIT 1:
I now split my code into multiple classes: http://pastebin.com/WpyKY4fa
Should I now move all the parameters to the constructor of the XLDAttributeAdder
class?