Skip to content

Commit 89d137f

Browse files
author
whitequark
committedAug 27, 2015
algorithm.Visitor.visit: return a value if an array is passed as well.
1 parent 6d74932 commit 89d137f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

Diff for: ‎pythonparser/algorithm.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def _visit_one(self, node):
3636
def visit(self, obj):
3737
"""Visit a node or a list of nodes. Other values are ignored"""
3838
if isinstance(obj, list):
39-
[self.visit(elt) for elt in obj]
39+
return [self.visit(elt) for elt in obj]
4040
elif isinstance(obj, ast.AST):
4141
return self._visit_one(obj)
4242

0 commit comments

Comments
 (0)
Please sign in to comment.