I would like to use the unpacking on the right side in the assignment:
>>> a = [3,4] >>> b = [1,2,*a] File "<stdin>", line 1 SyntaxError: can use starred expression only as assignment target
Of course I can do:
>>> b = [1,2] >>> b.extend(a) >>> b [1, 2, 3, 4]
But I find it cumbersome. Can I indicate a point? Easy way? Is this planned? Or is there a reason to obviously not have it in the language?
Part of the problem is that all container types use a constructor that expects iterability and does not accept the * args argument. I could have subclassed, but this represented some non-pythonic noise for scripts that others had to read.
source share