Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

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 (Ellipsis does not have it at all). For the same reasons 
you can not just pass the argument of visit_Constant() to visit_Str() -- they 
have different types.

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

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36917>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to