From 483c495d7be39767f80a0148369ddb0442605a1f Mon Sep 17 00:00:00 2001 From: Grygorii Iermolenko Date: Wed, 16 Jan 2019 12:45:18 +0200 Subject: [PATCH] Add notes to visitor --- patterns/behavioral/visitor.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/patterns/behavioral/visitor.py b/patterns/behavioral/visitor.py index bceb64d24..7235ce4c5 100644 --- a/patterns/behavioral/visitor.py +++ b/patterns/behavioral/visitor.py @@ -6,6 +6,14 @@ *TL;DR80 Separates an algorithm from an object structure on which it operates. + +An interesting recipe could be found in +Brian Jones, David Beazley "Python Cookbook" (2013): +- "8.21. Implementing the Visitor Pattern" +- "8.22. Implementing the Visitor Pattern Without Recursion" + +*Examples in Python ecosystem: +Python's ast.NodeVisitor: https://github.com/python/cpython/blob/master/Lib/ast.py#L250 """