classification
Title: Add command-line interface for the ast module
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.9
process
Status: closed Resolution: fixed
Dependencies: 37995 Superseder:
Assigned To: Nosy List: benjamin.peterson, brett.cannon, rhettinger, serhiy.storchaka, yselivanov
Priority: normal Keywords: patch

Created on 2019-09-07 09:31 by serhiy.storchaka, last changed 2019-09-09 20:42 by serhiy.storchaka. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 15724 merged serhiy.storchaka, 2019-09-07 09:38
Messages (2)
msg351297 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-09-07 09:31
The proposed PR adds a simple command-line interface to the ast module, similar to CLI of the tokenize and dis modules. It reads the content of a specified file (or stdin), parses it with ast.parse() and outputs the tree with ast.dump().

It can be used for learning internals of the Python compiler, in addition to tokenize and dis.
msg351550 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-09-09 20:36
New changeset 832e8640086ac4fa547c055a72929879cc5a963a by Serhiy Storchaka in branch 'master':
bpo-38049: Add command-line interface for the ast module. (GH-15724)
https://github.com/python/cpython/commit/832e8640086ac4fa547c055a72929879cc5a963a
History
Date User Action Args
2019-09-09 20:42:56serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-09-09 20:36:16serhiy.storchakasetmessages: + msg351550
2019-09-07 09:38:48serhiy.storchakasetdependencies: + Multiline ast.dump()
2019-09-07 09:38:21serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request15378
2019-09-07 09:31:33serhiy.storchakacreate