mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
gh-97933: (PEP 709) inline list/dict/set comprehensions (#101441)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
This commit is contained in:
parent
0aeda29793
commit
c3b595e73e
27 changed files with 1243 additions and 695 deletions
|
@ -16,7 +16,7 @@ class IsolatedAssembleTests(AssemblerTestCase):
|
|||
metadata.setdefault(key, key)
|
||||
for key in ['consts']:
|
||||
metadata.setdefault(key, [])
|
||||
for key in ['names', 'varnames', 'cellvars', 'freevars']:
|
||||
for key in ['names', 'varnames', 'cellvars', 'freevars', 'fasthidden']:
|
||||
metadata.setdefault(key, {})
|
||||
for key in ['argcount', 'posonlyargcount', 'kwonlyargcount']:
|
||||
metadata.setdefault(key, 0)
|
||||
|
@ -33,6 +33,9 @@ class IsolatedAssembleTests(AssemblerTestCase):
|
|||
|
||||
expected_metadata = {}
|
||||
for key, value in metadata.items():
|
||||
if key == "fasthidden":
|
||||
# not exposed on code object
|
||||
continue
|
||||
if isinstance(value, list):
|
||||
expected_metadata[key] = tuple(value)
|
||||
elif isinstance(value, dict):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue