[issue19541] ast.dump(indent=True) prettyprinting
New submission from anatoly techtonik: ast.dump needs an indent argument for pretty printing. from pprint import pprint as pp pp(ast.dump(node)) "Assign(targets=[Tuple(elts=[Name(id='d', ctx=Store()), Name(id='m', ctx=Store())], ctx=Store())], value=Call(func=Name(id='divmod', ctx=Load()), args=[Call(func=Name(id='len', ctx=Load()), args=[Name(id='seq', ctx=Load())], keywords=[], starargs=None, kwargs=None), Name(id='size', ctx=Load())], keywords=[], starargs=None, kwargs=None))" ---------- assignee: docs@python components: Documentation messages: 202506 nosy: docs@python, techtonik priority: normal severity: normal status: open title: ast.dump(indent=True) prettyprinting _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue19541> _______________________________________
participants (1)
-
anatoly techtonik