[issue36917] ast.NodeVisitor no longer calls visit_Str
Matthias Bussonnier
report at bugs.python.org
Tue May 14 14:41:33 EDT 2019
Matthias Bussonnier <bussonniermatthias at gmail.com> added the comment:
> There would still be a breakage for that if someone was defining py36+ `visit_Constant` (which would clobber the `ast.NodeVisitor.visit_Constant` if we were to add it)
Ok, it would still break in some cases, but that would still be a net improvement for codebase that do not override visit_Constant; right ?
We could also push the patch further if we really want and call explicitly NodeVisitor.visit_Constant before the overridden method in NodeVisitor.visit.
Not advocating for the second part, but minimal breakage and code repetition in libraries when we can.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36917>
_______________________________________
More information about the Python-bugs-list
mailing list