On 12/15/2011 9:23 PM, Ben Finney wrote:
Ned Batchelderned@nedbatchelder.com writes:
Then we define a function foo(*args), and Python gives us a tuple! :-(
Yes, exactly: the positional arguments to the function are *not* a homogeneous sequence, so a list doesn't connote the right thing. The position is important – we call them “positional arguments” – so a tuple makes sense.
In general the positional arguments to a function are not homogenous, but the foo(*args) syntax is for precisely when you don't know how many args you will get, and you will of necessity treat them homogenously, no? We've been through this in another branch of this thread...