Author BTaskaya
Recipients BTaskaya, benjamin.peterson, pablogsal
Date 2020-02-15.11:32:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1581766346.86.0.0377348739096.issue39638@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-02-15 11:32:26BTaskayasetrecipients: + BTaskaya, benjamin.peterson, pablogsal
2020-02-15 11:32:26BTaskayasetmessageid: <1581766346.86.0.0377348739096.issue39638@roundup.psfhosted.org>
2020-02-15 11:32:26BTaskayalinkissue39638 messages
2020-02-15 11:32:25BTaskayacreate