Batuhan <batuhanosmantask...@gmail.com> added the comment:
Tools/parser/unparse.py has been moved under ast module and exposed via ast.unparse() interface. If you want to support custom AST statements, the current version is incapable of doing such changes because of the real unparser class is private. As a workaround you can import it and subclass it /assign a method and then use ast.unparse() but that is a hacky way and there is no one who can guarantee if that unparser class will change its API or not. Currently it uses NodeVisitor API. Also you can use Berker's astor project to do this job, which gives you ability of changing source generator class. ---------- components: +Library (Lib) -Demos and Tools nosy: +BTaskaya, pablogsal versions: +Python 3.9 -Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35632> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com