]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-38870: Expose a function to unparse an ast object in the ast module (GH-17302)
authorPablo Galindo <Pablogsal@gmail.com>
Sun, 24 Nov 2019 23:02:40 +0000 (23:02 +0000)
committerGitHub <noreply@github.com>
Sun, 24 Nov 2019 23:02:40 +0000 (23:02 +0000)
commit27fc3b6f3fc49a36d3f962caac5c5495696d12ed
treea95472c5bd4a5a0588a3725b4b8b1a94547c9999
parent6bf644ec82f14cceae68278dc35bafb00875efae
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.
Doc/library/ast.rst
Doc/whatsnew/3.9.rst
Lib/ast.py
Lib/test/test_unparse.py [moved from Lib/test/test_tools/test_unparse.py with 76% similarity]
Misc/NEWS.d/next/Library/2019-11-20-22-43-48.bpo-38870.rLVZEv.rst [new file with mode: 0644]
Tools/parser/unparse.py [deleted file]