diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2019-11-24 23:02:40 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-24 23:02:40 (GMT) |
commit | 27fc3b6f3fc49a36d3f962caac5c5495696d12ed (patch) | |
tree | a95472c5bd4a5a0588a3725b4b8b1a94547c9999 /Doc/whatsnew | |
parent | 6bf644ec82f14cceae68278dc35bafb00875efae (diff) | |
download | cpython-27fc3b6f3fc49a36d3f962caac5c5495696d12ed.zip cpython-27fc3b6f3fc49a36d3f962caac5c5495696d12ed.tar.gz cpython-27fc3b6f3fc49a36d3f962caac5c5495696d12ed.tar.bz2 |
bpo-38870: Expose a function to unparse an ast object in the ast module (GH-17302)
Add ast.unparse() as a function in the ast module that can be used to unparse an
ast.AST object and produce a string with code that would produce an equivalent ast.AST
object when parsed.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/3.9.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.9.rst b/Doc/whatsnew/3.9.rst index a3ad98d..9af5259 100644 --- a/Doc/whatsnew/3.9.rst +++ b/Doc/whatsnew/3.9.rst @@ -121,6 +121,11 @@ Added the *indent* option to :func:`~ast.dump` which allows it to produce a multiline indented output. (Contributed by Serhiy Storchaka in :issue:`37995`.) +Added the :func:`ast.unparse` as a function in the :mod:`ast` module that can +be used to unparse an :class:`ast.AST` object and produce a string with code +that would produce an equivalent :class:`ast.AST` object when parsed. +(Contributed by Pablo Galindo and Batuhan Taskaya in :issue:`38870`.) + asyncio ------- |