]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-44139: Use a more descriptive syntax error comprehension case in the What's New...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 15 May 2021 16:56:28 +0000 (09:56 -0700)
committerGitHub <noreply@github.com>
Sat, 15 May 2021 16:56:28 +0000 (17:56 +0100)
(cherry picked from commit c5b833046d9dbb2063f776703fc513b71664b859)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Doc/whatsnew/3.10.rst

index c15bb32693809762e2c14c6656187c0b787e4412..926679e6f32dc525bbcbbd13ea280d021a77d7d9 100644 (file)
@@ -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 "<stdin>", 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?