This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Anthony Sottile
Recipients Anthony Sottile, mbussonn, serhiy.storchaka
Date 2019-05-15.19:38:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1557949124.89.0.499438924448.issue36917@roundup.psfhosted.org>
In-reply-to
Content
> You can not use the same implementation of the visitor for Num, Str, NameConstant and Ellipsis, because all these classes use different attribute for saving the value

ah yes, this is true -- maybe the better change would be to just add `@property value` to each of those instead of collapsing the classes? (If that's the actual convenience we're trying to achieve)

> No need to call generic_visit() from visit_Constant() -- Constant nodes should not contain AST nodes.

correct there's no need, but it's a best practice to always call `generic_visit` in all `visit_*` methods, I have a linter I haven't finished up yet that checks this.  And who knows if that'll be true in the future!
History
Date User Action Args
2019-05-15 19:38:44Anthony Sottilesetrecipients: + Anthony Sottile, serhiy.storchaka, mbussonn
2019-05-15 19:38:44Anthony Sottilesetmessageid: <1557949124.89.0.499438924448.issue36917@roundup.psfhosted.org>
2019-05-15 19:38:44Anthony Sottilelinkissue36917 messages
2019-05-15 19:38:44Anthony Sottilecreate