Skip to content

Commit

Permalink
algorithm.Visitor.visit: return a value if an array is passed as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
whitequark committed Aug 27, 2015
1 parent 6d74932 commit 89d137f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pythonparser/algorithm.py
Expand Up @@ -36,7 +36,7 @@ def _visit_one(self, node):
def visit(self, obj):
"""Visit a node or a list of nodes. Other values are ignored"""
if isinstance(obj, list):
[self.visit(elt) for elt in obj]
return [self.visit(elt) for elt in obj]
elif isinstance(obj, ast.AST):
return self._visit_one(obj)

Expand Down

0 comments on commit 89d137f

Please sign in to comment.