New submission from Batuhan Taskaya <batuhanosmantask...@gmail.com>:
It would be super convenient to keep ASDL declarations in AST nodes. There are multiple benefits of it; 1 -> When debugging or playing with the AST, time to time you may require to know what kind of things a field gets or is that field an optional one. 2 -> The AST nodes are pretty limited on what can they do by default. For extending their scope, 3rd party tools often copy python's ASDL to their source and build custom AST nodes from that. And with knowing what every field gets they can automatically generate autotransformer codes from that ASDL spec which takes python's standard AST and convert it to their own AST nodes. We can either create a new attribute or keep this in the docstring. I think keeping this in the docstring can at least give some info about the node rather than None so it makes more sense to me. If the feature wanted, I can propose a PR. ---------- components: Library (Lib) messages: 362012 nosy: BTaskaya, benjamin.peterson, pablogsal priority: low severity: normal status: open title: Keep ASDL signatures for AST nodes type: enhancement versions: Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39638> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com