Issue 6100: Expanding arrays inside other arrays

Created on 2009-05-24 22:30 by marek_sp, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg88292 - (view) Author: Marek SpociƄski (marek_sp) Date: 2009-05-24 22:30
Hello!
I recently thought about a nice feature (pure syntactic sugar):
>>> a = [2,3,4]
>>> b = [1,*a,5]
>>> print b
[1, 2, 3 ,4 ,5]

instead of:
>>> b = [1]+a+[5]

I think first one is somewhat more readable and similiar thing already
is possible with function calls. For example:
>>> c = func(*a)
msg88534 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2009-05-29 20:41
I agree.  This and more is part of #2292
History
Date User Action Args
2022-04-11 14:56:49adminsetgithub: 50350
2009-05-29 20:41:07terry.reedysetstatus: open -> closed

nosy: + terry.reedy
messages: + msg88534

superseder: Missing *-unpacking generalizations
resolution: duplicate

2009-05-24 22:30:11marek_spcreate