Martin Panter added the comment: 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 ---------- Added file: http://bugs.python.org/file43339/unpacking-doc.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24136> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com