Skip to content
Ravnary
A Knowledge Platform
Categories
Learn
Cheatsheets
Paths
Favourites
Review
Community
Colour theme
Light
Dark
System
Learn
Design Patterns
Behavioural Patterns
Visitor Pattern
Quiz
Q 01
/ 04
Intermediate
Question 1 of 4. 0 correct, 0 incorrect.
A subclass of ast.NodeVisitor defines only visit_Call and is used to visit a parsed program. Which statements are true?
An AttributeError is raised at the first node that is not a call
A call nested inside another call is found, if visit_Call calls generic_visit
Each ast node class must define an accept method for the visitor to work
For a node that is not a call, generic_visit runs and visits the node's children
Check answer
Home
Learn
Paths
Saved
Community