On 17 Jul., 18:33, Gary Herron <[EMAIL PROTECTED]> wrote: > > In Python 2.x, you can't do that directly, but you should be able to > create a function that lengthens or shortens an input tuple of arguments > to the correct length so you can do: > > a,c,b = fix(1,2) > d,e,f = fix(1,2,3,4) > > However, the function won't know the length of the left hand side > sequence, so it will have to be passed in as an extra parameter or hard > coded.
Hi Gary, thank you for the answer. Do you know the "protocol" used by python while unpacking? Is it a direct assingnment? Or iterating? Best regards Andreas Mock -- http://mail.python.org/mailman/listinfo/python-list