]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-34822: Simplify AST for subscription. (GH-9605)
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 10 Mar 2020 16:52:34 +0000 (18:52 +0200)
committerGitHub <noreply@github.com>
Tue, 10 Mar 2020 16:52:34 +0000 (18:52 +0200)
commit13d52c268699f199a8e917a0f1dc4c51e5346c42
treed602c97d77e3222d38c6300ed822021e51bd9dce
parente5e56328afac50aad6d8893185d8e7ba8928afe2
bpo-34822: Simplify AST for subscription. (GH-9605)

* Remove the slice type.
* Make Slice a kind of the expr type instead of the slice type.
* Replace ExtSlice(slices) with Tuple(slices, Load()).
* Replace Index(value) with a value itself.

All non-terminal nodes in AST for expressions are now of the expr type.
15 files changed:
Doc/library/ast.rst
Doc/tools/susp-ignored.csv
Doc/whatsnew/3.9.rst
Include/Python-ast.h
Lib/ast.py
Lib/test/test_ast.py
Lib/test/test_type_comments.py
Misc/NEWS.d/next/Library/2018-09-27-19-31-47.bpo-34822.EztBhL.rst [new file with mode: 0644]
Parser/Python.asdl
Python/Python-ast.c
Python/ast.c
Python/ast_opt.c
Python/ast_unparse.c
Python/compile.c
Python/symtable.c