[issue40528] Improve / Clear ASDL generator

Batuhan Taskaya report at bugs.python.org
Wed May 6 09:16:11 EDT 2020


Batuhan Taskaya <batuhanosmantaskaya at gmail.com> added the comment:

> I was also thinking about getting rid of "string" nodes and just use Constant for those. Having the strings raw make the AST inconsistent because nodes that are 'strings' do not have line numbers and other metadata, making tools that need the source to report stuff more complex than it should.

I'm +1 on that (especially for finding import aliases, as we discussed earlier), if necessary precautions happen to ensure minimum breakage (from what I understand, it is something that will break everyone's code. Maybe we can implement custom Constant.__str__? and other different things to ensure it breaks small).

----------

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


More information about the Python-bugs-list mailing list