First decorator implementations.

This commit is contained in:
Dave Halter
2014-11-17 22:24:54 +01:00
parent df5df1ccf5
commit f62f181066
5 changed files with 32 additions and 12 deletions
+1 -2
View File
@@ -160,8 +160,7 @@ class NameFinder(object):
# current scope.
if isinstance(stmt, (pr.Param, pr.Import)) \
or isinstance(name_list_scope, (pr.Lambda, pr.ListComprehension, er.Instance, InterpreterNamespace)) \
or isinstance(scope, compiled.CompiledObject) \
or isinstance(stmt, pr.ExprStmt) and stmt.is_global():
or isinstance(scope, compiled.CompiledObject):
# Always reachable.
names.append(name)
else: