[issue39715] Implement __repr__ methods for AST classes

Ram Rachum report at bugs.python.org
Fri Feb 21 14:26:21 EST 2020


Ram Rachum <ram at rachum.com> added the comment:

I understand that we have to be really careful in including information that could have unlimited size. But I think we have lots of information that isn't that way.

For example, for ClassDef and FunctionDef objects, we could include the name. For Assign, we could include the lhs. For Import, we could include the module name, etc.

And for all objects, we could include the number of descendants that they have, so people could more easily understand which are tiny and which are huge.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39715>
_______________________________________


More information about the Python-bugs-list mailing list