[Python-ideas] A nice __repr__ for the ast.* classes?

anatoly techtonik techtonik at gmail.com
Tue Nov 19 18:55:30 CET 2013


On Wed, May 1, 2013 at 6:51 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
>
> In this particular case, I'm also inclined to favour the approach of
> using ast.dump as the repr for AST nodes. Call it +0.
>
> Adding support for depth limiting and peer node limiting to ast.dump
> (with missing nodes replaced with "...") would also be neat.

https://bitbucket.org/techtonik/astdump/src/ed73edbdccb5fd9d4255d7ed64f45b6922447ecb/astdump.py?at=default#cl-35
Something like this?
--
anatoly t.


More information about the Python-ideas mailing list