mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
bpo-40334: PEP 617 implementation: New PEG parser for CPython (GH-19503)
Co-authored-by: Guido van Rossum <guido@python.org> Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
This commit is contained in:
parent
a81849b031
commit
c5fc156852
91 changed files with 27057 additions and 146 deletions
|
@ -158,14 +158,15 @@ List comprehension element unpacking
|
|||
...
|
||||
SyntaxError: iterable unpacking cannot be used in comprehension
|
||||
|
||||
Generator expression in function arguments
|
||||
# Pegen is better here.
|
||||
# Generator expression in function arguments
|
||||
|
||||
>>> list(*x for x in (range(5) for i in range(3)))
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
list(*x for x in (range(5) for i in range(3)))
|
||||
^
|
||||
SyntaxError: invalid syntax
|
||||
# >>> list(*x for x in (range(5) for i in range(3)))
|
||||
# Traceback (most recent call last):
|
||||
# ...
|
||||
# list(*x for x in (range(5) for i in range(3)))
|
||||
# ^
|
||||
# SyntaxError: invalid syntax
|
||||
|
||||
>>> dict(**x for x in [{1:2}])
|
||||
Traceback (most recent call last):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue