[Python-ideas] list / array comprehensions extension

Masklinn masklinn at masklinn.net
Thu Dec 15 19:25:41 CET 2011

On 2011-12-15, at 18:35 , Alexander Heger wrote:
> I know all of these, but
> 1) it is not as elegant or short
Sure, I was just answering the rest of of the question
> 2) why does unpacking not work syntactically the same as for the function parameters?
Because nobody's thought of it so far.

> So, the point is not that something like
> [0,*x,0,*y,0]
> can't be done in other ways, but that it can't be done in a neat way.
Well, you *did* ask:

> Or is there a way of doing this that in a similarly compact and
> obvious way I did not yet discover?

More information about the Python-ideas mailing list