Navigation Menu

Skip to content

Commit

Permalink
test "tests/namespace/scope.py" now passes for modules and standard
Browse files Browse the repository at this point in the history
  • Loading branch information
thenewguy committed Jul 14, 2012
1 parent e9d2457 commit b164451
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pyjaco/compiler/python.py
Expand Up @@ -334,6 +334,8 @@ def visit_AugAssign(self, node):

def visit_For(self, node):
if isinstance(node.target, ast.Name):
if self.module and not self.scope_is_global and not node.target.id in self.local_scope:
self._vars.append(node.target.id)
for_target = self.visit(node.target)
elif isinstance(node.target, ast.Tuple):
for_target = self.alloc_var()
Expand Down

0 comments on commit b164451

Please sign in to comment.