I’m looking to return two instance variables from a class by calling a simple method, and these values will be parameters in a cursor.execute() database query:
def params(self):
return self.accounts, self.date
self.accounts is a tuple of account strings, self.date is a just a single datetime object.
Is there an idiomatic way to return these two data structures flattened so they will be populated into my query properly? Is it best to just write code in the method to arrange the values prior to returning them?
Just add to the tuple.