Skip to content

Commit 6dace38

Browse files
authored
Merge pull request faif#271 from gyermolenko/add_notes_to_visitor
Add notes to visitor
2 parents 2e1f57c + 483c495 commit 6dace38

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)