mirror of
https://github.com/python/cpython.git
synced 2025-11-25 12:44:13 +00:00
bpo-44139: Use a more descriptive syntax error comprehension case in the What's New for 3.10 (GH-26145)
This commit is contained in:
parent
f24afda591
commit
c5b833046d
1 changed files with 2 additions and 2 deletions
|
|
@ -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?
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue