summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-11-15 06:49:40 (GMT)
committerGitHub <noreply@github.com>2017-11-15 06:49:40 (GMT)
commit9165f77d5f93a2c12aa0e90853e3ae7212800d3c (patch)
tree96b831acd89b33f865d0be34bdbf5b7431c780c0 /Doc
parent3bda02222aa3783bf85fc3ff8bc042aefd9c4fd3 (diff)
downloadcpython-9165f77d5f93a2c12aa0e90853e3ae7212800d3c.zip
cpython-9165f77d5f93a2c12aa0e90853e3ae7212800d3c.tar.gz
cpython-9165f77d5f93a2c12aa0e90853e3ae7212800d3c.tar.bz2
bpo-32012: Disallow trailing comma after genexpr without parenthesis. (#4382)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/whatsnew/3.7.rst14
1 files changed, 14 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst
index f6d051d..82b4840 100644
--- a/Doc/whatsnew/3.7.rst
+++ b/Doc/whatsnew/3.7.rst
@@ -630,6 +630,20 @@ This section lists previously described changes and other bugfixes
that may require changes to your code.
+Changes in Python behavior
+--------------------------
+
+* Due to an oversight, earlier Python versions erroneously accepted the
+ following syntax::
+
+ f(1 for x in [1],)
+
+ Python 3.7 now correctly raises a :exc:`SyntaxError`, as a generator
+ expression always needs to be directly inside a set of parentheses
+ and cannot have a comma on either side.
+ (Contributed by Serhiy Storchaka in :issue:`32012`.)
+
+
Changes in the Python API
-------------------------