[issue32012] Disallow ambiguous syntax f(x for x in [1],)

Serhiy Storchaka report at bugs.python.org
Sun Nov 12 17:29:05 EST 2017


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

The syntax f(x for x in [1],) is ambiguous and reasons that allow it (omitting parenthesis in generator expression and using trailing comma in call expression) are not applicable in this case. Rationales see on Python-Dev: https://mail.python.org/pipermail/python-dev/2017-November/150481.html.

----------
components: Interpreter Core
messages: 306132
nosy: benjamin.peterson, brett.cannon, ncoghlan, serhiy.storchaka, yselivanov
priority: normal
severity: normal
status: open
title: Disallow ambiguous syntax f(x for x in [1],)
type: enhancement
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32012>
_______________________________________


More information about the Python-bugs-list mailing list