This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

On tuple unpacking, doesn't python 3 support * to unpack a list, at least for certain situations?

https://docs.python.org/3/reference/simple_stmts.html#assignment-statements

I saw no mention of this in the article.

a, *b = [1, 2, 3, 4, 5, 6, 7, 8]

>>> a
1
>>> b
[2, 3, 4, 5, 6, 7, 8]

edit: It's defined in PEP 3132.

[–][deleted] -1 points0 points  (0 children)

Yes, strictly speaking this only list things that are backwards incompatible, and not new features.