[issue39686] add dump_json to ast module

2020-05-23 Thread Cheryl Sabella
Change by Cheryl Sabella : -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[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 from the clang

[issue39686] add dump_json to ast module

2020-02-19 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Just to clarify: ast.dump *will* fail with a more deph object as well, I am not claiming that ast.dump will parse everything because of course suffers the same problem. -- ___ Python tracker

[issue39686] add dump_json to ast module

2020-02-19 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > There seems to be movement towards a general usage. For instance, take a look > at clang, in particular the flag '-ast-dump=json'. I don't think the clang argument holds because clang is a command-line tool after all and it makes sense that it can

[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 for doing that in

[issue39686] add dump_json to ast module

2020-02-19 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Thanks, Richard for your proposal. I concur with Batuhan: I am -1 as well on this addition. Echoing some of the same ideas, I think this is specialized enough that does not make sense to have it in the standard library, especially if a Pypi package

[issue39686] add dump_json to ast module

2020-02-19 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > The proposed enhancement would provide a complementary function, `dump_json` > as in a json representation of the ast. IMHO this is not a feature that has a general usage. If you want, as far as I can see, there are some packages for doing that in PyPI

[issue39686] add dump_json to ast module

2020-02-19 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[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 ___

[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 representation