[issue39686] add dump_json to ast module

2020-02-19 Thread Richard K
Richard K added the comment: > I don't think the clang argument holds because clang is a command-line tool > after all and it makes sense that it can produce several outputs while the > ast module is exposes APIs that you can further process inside the language. > Having json fr

[issue39686] add dump_json to ast module

2020-02-19 Thread Richard K
Richard K added the comment: Batuhan & Pablo thank you for your thoughts! Just wanted to reply to a few of the comments to clarify my position on the issue. > IMHO this is not a feature that has a general usage. If you want, as far as I > can see, there are some packages

[issue39686] add dump_json to ast module

2020-02-18 Thread Richard K
Change by Richard K : -- keywords: +patch pull_requests: +17938 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18558 ___ Python tracker <https://bugs.python.org/issu

[issue39686] add dump_json to ast module

2020-02-18 Thread Richard K
New submission from Richard K : Currently within the ast module, `dump` generates a string representation of the AST for example, >>> ast.dump(node) 'Module(body=[], type_ignores=[])' The proposed enhancement would provide a complementary function, `dump_json` as in a json repre