This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author BTaskaya
Recipients BTaskaya, benjamin.peterson, pablogsal, sparverius
Date 2020-02-19.14:00:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1582120814.83.0.0937208131203.issue39686@roundup.psfhosted.org>
In-reply-to
Content
> 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 already. Also, the patch looks small so you can just add this to the required project.

> This would be useful for those who would like to benefit from the utilities of the json module for formatting, pretty-printing, and the like.  

ast.dump now can dump in pretty-printed way.

> It would also be useful for those who want to serialize the AST or export it in a form that can be consumed in an other programming language.

As I said, serializing/exporting the AST isn't a common use case. It is a very specific goal.

In general, I'm -1 on this.
History
Date User Action Args
2020-02-19 14:00:14BTaskayasetrecipients: + BTaskaya, benjamin.peterson, pablogsal, sparverius
2020-02-19 14:00:14BTaskayasetmessageid: <1582120814.83.0.0937208131203.issue39686@roundup.psfhosted.org>
2020-02-19 14:00:14BTaskayalinkissue39686 messages
2020-02-19 14:00:14BTaskayacreate