AdSR wrote: >> Yes, but usually not so much in function arguments but more in >> list-comprehensions or other places where unpacking was useful. I > love the >> feature - I just don't have nested enough data to use it more :) > > I use tuple unpacking in its typical uses, it's one of the first > language features I learned about. Somehow it never occurred to me that > you could use it in function arguments this way - I only knew f(*args, > **kwargs) style in this context. That's what I made the whole fuss > about...
Well, if you think about it the whole positional argument passing is nothing more than tuple unpacking. Its like having an anonymous variable that gets unpacked: def foo(a,b,c = i_m_so_anonymous): pass So it's just orthogonal to have the full functionality of unpacking available for function arguments - including the nested tuples. -- Regards, Diez B. Roggisch -- http://mail.python.org/mailman/listinfo/python-list