Skip to content

Commit

Permalink
add Python2 only Expression visit
Browse files Browse the repository at this point in the history
  • Loading branch information
loechel committed Feb 3, 2017
1 parent 20797f6 commit 50d7d21
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/RestrictedPython/transformer.py
Expand Up @@ -608,6 +608,11 @@ def visit_Starred(self, node):
return self.node_contents_visit(node)

# Expressions
def visit_Expression(self, node):
"""Allow Expression statements without restrictions.
Python 2 only AST Element.
"""
return self.node_contents_visit(node)

def visit_Expr(self, node):
"""Allow Expr statements without restrictions."""
Expand Down

0 comments on commit 50d7d21

Please sign in to comment.