To follow the canonical visitor pattern in Python, each type should have an accept method that takes a visitor object and then calls a type specific method of the visitor.
It is expected that this call require anything else of the visitor than implementing the method as expected by the type class.
For instance
class SubComponent(Feature):
…
def accept(self, visitor):
visitor.visit_sub_component(self)
To follow the canonical visitor pattern in Python, each type should have an
accept
method that takes a visitor object and then calls a type specific method of the visitor. It is expected that this call require anything else of the visitor than implementing the method as expected by the type class.For instance