classification
Title: Expanding arrays inside other arrays
Type: enhancement Stage:
Components: Interpreter Core Versions: Python 3.0, Python 3.1, Python 3.2, Python 2.7, Python 2.6
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Missing *-unpacking generalizations
View: 2292
Assigned To: Nosy List: marek_sp, terry.reedy
Priority: normal Keywords:

Created on 2009-05-24 22:30 by marek_sp, last changed 2009-05-29 20:41 by terry.reedy. 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
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