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 c5b833046d)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
This commit is contained in:
Miss Islington (bot) 2021-05-15 09:56:28 -07:00 committed by GitHub
parent 71dca6ea73
commit 67729a91a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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?