Skip to content

Commit 483c495

Browse files
committed
Add notes to visitor
1 parent 2e1f57c commit 483c495

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

patterns/behavioral/visitor.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
77
*TL;DR80
88
Separates an algorithm from an object structure on which it operates.
9+
10+
An interesting recipe could be found in
11+
Brian Jones, David Beazley "Python Cookbook" (2013):
12+
- "8.21. Implementing the Visitor Pattern"
13+
- "8.22. Implementing the Visitor Pattern Without Recursion"
14+
15+
*Examples in Python ecosystem:
16+
Python's ast.NodeVisitor: https://github.com/python/cpython/blob/master/Lib/ast.py#L250
917
"""
1018

1119

0 commit comments

Comments
 (0)