| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| elif isinstance(value, AST): | ||
| self.visit(value) | ||
|
|
||
| def visit_Constant(self, node): |
There was a problem hiding this comment.
Uh I think you accidentally removed this. Above said to use this. 😄
Sorry, something went wrong.
There was a problem hiding this comment.
I deliberately removed it. It will still work if you define visit_Constant on a custom subclass of ast.NodeVisitor. The reason why it is currently defined on ast.NodeVisitor itself — uniquely among the visit_* methods — is to ensure that the deprecated methods visit_Num, visit_Str, etc. continue to work if you define them on a subclass of ast.NodeVisitor.
Sorry, something went wrong.
There was a problem hiding this comment.
I tried to clarify this a bit in 40b5965 -- hopefully that helps!
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #119562
📚 Documentation preview 📚: https://cpython-previews--119563.org.readthedocs.build/