Now I know there are many duplicates asking a similar question [1][2][3][4][5], however I believe none of them call a function with multiple input parameters inside another function with multiple parameters in the same Class; which happens to be my particular problem (unless I missed it during my search).
Below is a minimum working example where I am trying to use the results of function1 in function2:
class Something():
def __init__(self,input1, input2, input3):
self.input1 = input1
self.input2 = input2
self.input3 = input3
def function1(self, input4, input5, input6):
something = (self.input1 + self.input2 + self.input3)+input4+input5+input6
return something
def function2(self, input7, input8):
something2 = self.function1(self.input4, self.input5, self.input6)+input7+input8
return something2
a = Something(1,2,3)
print(a.function1(4,5,6))
print(a.function2(7, 8))
Function1 prints out fine, however when I call Function2, I get an error:
AttributeError: 'Something' object has no attribute 'input4'
I'm probably missing a simple step here, however I can't seem to figure out how to use the results of function1 inside function2 without having to redefining all the input parameters again.