tags:

views:

25

answers:

1

I have a function definition in a Python 2.x script which takes a tuple as one of its arguments, but 2to3 has no answers nor any of my searching on how to represent the same in Python 3.x

eg. def blah(self, (string1, string2)):

Any help greatly appreciated

+1  A: 

It's simple.

def blah(self, strings):
  string1, string2 = strings
  ...
hmmm ... I am not sure that will work for me. I guess I should elaborate, I thought I could make it simple.I have code that defines the following:def blah(self, (string1, string2)): return blah2('help', (string1, string2))and def blah2(self, name, string1=None): ...So if blah is only that 2 line def, how does your suggestion work in this context? (or am I missing the point)Sorry to not have elaborated the first time if this is now completely different scenario :(
Grail