GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — gh-119562: Remove AST nodes deprecated since Python 3.8 by AlexWaygood · Pull Request #119563 · python/cpython Conversation
|
| elif isinstance(value, AST): | ||
| self.visit(value) | ||
|
|
||
| def visit_Constant(self, node): |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Uh I think you accidentally removed this. Above said to use this. 😄
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
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 an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I tried to clarify this a bit in 40b5965 -- hopefully that helps!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Remove AST nodes deprecated since Python 3.8, with warnings since Python 3.12
There was an error while loading. Please reload this page.