From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sat, 15 May 2021 16:56:28 +0000 (-0700) Subject: bpo-44139: Use a more descriptive syntax error comprehension case in the What's New... X-Git-Tag: v3.10.0b2~87 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=67729a91a5fe6ad06fb5f2cc4f91ad99876e431a;p=thirdparty%2FPython%2Fcpython.git bpo-44139: Use a more descriptive syntax error comprehension case in the What's New for 3.10 (GH-26145) (GH-26146) (cherry picked from commit c5b833046d9dbb2063f776703fc513b71664b859) Co-authored-by: Pablo Galindo --- diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index c15bb3269380..926679e6f32d 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -215,9 +215,9 @@ have been incorporated. Some of the most notable ones: .. code-block:: python - >>> {x,y for x,y in range(100)} + >>> {x,y for x,y in zip('abcd', '1234')} File "", line 1 - {x,y for x,y in range(100)} + {x,y for x,y in zip('abcd', '1234')} ^ SyntaxError: did you forget parentheses around the comprehension target?