This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients JelleZijlstra, NeilGirdhar, barry, benjamin.peterson, berker.peksag, docs@python, ezio.melotti, martin.panter, moigagoo, paul.moore, r.david.murray, steve.dower, supriyanto maftuh, supriyantomaftuh, terry.reedy, tim.golden, vstinner, zach.ware
Date 2016-06-11.05:25:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Here is a new patch that also updates the documentation for list etc displays as well as function calls. Let me know what you think.

The 3.5 What’s New notes were written separately; Neil’s patch was never applied. But I have rescued his update for functools.partial() in my new patch.

While experimenting with the current behaviour, I found some surprising inconsistencies. The following syntaxes are allowed:

>>> x, *y
>>> a = x, *y
>>> f"{x, *y}"  # New in 3.6
>>> async def f(): await x, *y

But the following all produce “SyntaxError: invalid syntax”:

>>> a += x, *y
>>> eval("x, *y")
>>> def f(): return x, *y
>>> def f(): yield x, *y
>>> for i in x, *y: ...

Also, the expressions allowed for unpacking in general are more limited than in function calls:

>>> f(x, *y == z)  # Allowed
>>> (x, *y == z)
SyntaxError: invalid syntax
Date User Action Args
2016-06-11 05:25:17martin.pantersetrecipients: + martin.panter, barry, terry.reedy, paul.moore, vstinner, tim.golden, benjamin.peterson, ezio.melotti, r.david.murray, docs@python, berker.peksag, zach.ware, steve.dower, NeilGirdhar, moigagoo, JelleZijlstra, supriyanto maftuh, supriyantomaftuh
2016-06-11 05:25:17martin.pantersetmessageid: <>
2016-06-11 05:25:17martin.panterlinkissue24136 messages
2016-06-11 05:25:16martin.pantercreate