Permalink
Browse files

separate the calls for checking scope in visit_Name. This is more ver…

…bose, but it is easy to see the order of preference for determining the final name.
  • Loading branch information...
1 parent b29f370 commit a5cbeb131991adf06e5d358069f83593f20dbf03 @thenewguy committed Feb 20, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 pyjaco/compiler/python.py
@@ -94,7 +94,11 @@ def visit_Name(self, node):
pass
elif name in self.local_scope:
pass
- elif self.build_ref(name) in self.scope:
+ elif self.build_ref(name) in self.local_scope:
+ name = self.build_ref(name)
+ elif name in self.global_scope:
+ pass
+ elif self.build_ref(name) in self.global_scope:
name = self.build_ref(name)
elif name in self.builtin:
name = "__builtins__.PY$" + name

0 comments on commit a5cbeb1

Please sign in to comment.