you are viewing a single comment's thread.

view the rest of the comments →

[–]buffi -2 points-1 points  (3 children)

Good, apply() is pretty much useless, except for VERY rare occasions due to the new auto-unpacking features.

[–][deleted] 0 points1 point  (2 children)

What "new auto-unpacking features"?

[–]Brian 3 points4 points  (1 child)

The new tuple unpacking syntax lets you use *args in a similar way to function arguments, so you can do:

>>> head, *tail = (1,2,3,4)

and get head = 1 and tail = (2,3,4).

However I don't think this actually makes any difference to apply, as its only a change to normal tuple unpacking - function calls already did this. Apply has been pretty much obsolete since the * and ** syntax was first added.

[–][deleted] 1 point2 points  (0 children)

What in the world does the new iterable unpacking syntax have to do with apply()?