Hi everyone this is probably something extremely simple that i’m overlooking but can someone point me in the right direction for how to handle this problem.
def nodeFunction(self,*args):
return self[1] + self[2]
Basically what I am trying to do is grab the data passed in through the arguments. I am just stuck on the syntax for referencing the arguments inside the function when using *args.
argsis simply a tuple:Is that what you mean?
Note that there’s nothing special about “args”. You could use any variable name. It’s the
*operator that counts.Still, “args” is the most idiomatic variable name; I wouldn’t use anything else without a good reason that would be obvious to others.