summaryrefslogtreecommitdiffstats
path: root/Lib/compiler/symbols.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/compiler/symbols.py')
-rw-r--r--Lib/compiler/symbols.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/compiler/symbols.py b/Lib/compiler/symbols.py
index bf9a724..200341f 100644
--- a/Lib/compiler/symbols.py
+++ b/Lib/compiler/symbols.py
@@ -131,7 +131,7 @@ class Scope:
rather than free.
Be careful to stop if a child does not think the name is
- free.
+ free.
"""
self.globals[name] = 1
if self.frees.has_key(name):
@@ -172,7 +172,7 @@ class Scope:
class ModuleScope(Scope):
__super_init = Scope.__init__
-
+
def __init__(self):
self.__super_init("global", self)
@@ -183,7 +183,7 @@ class LambdaScope(FunctionScope):
__super_init = Scope.__init__
__counter = 1
-
+
def __init__(self, module, klass=None):
i = self.__counter
self.__counter += 1
@@ -199,7 +199,7 @@ class SymbolVisitor:
def __init__(self):
self.scopes = {}
self.klass = None
-
+
# node that define new scopes
def visitModule(self, node):
@@ -217,7 +217,7 @@ class SymbolVisitor:
self._do_args(scope, node.argnames)
self.visit(node.code, scope)
self.handle_free_vars(scope, parent)
-
+
def visitLambda(self, node, parent):
for n in node.defaults:
self.visit(n, parent)
@@ -326,7 +326,7 @@ class SymbolVisitor:
self.visit(node.lower, scope, 0)
if node.upper:
self.visit(node.upper, scope, 0)
-
+
def visitAugAssign(self, node, scope):
# If the LHS is a name, then this counts as assignment.
# Otherwise, it's just use.
@@ -371,8 +371,8 @@ if __name__ == "__main__":
def get_names(syms):
return [s for s in [s.get_name() for s in syms.get_symbols()]
- if not (s.startswith('_[') or s.startswith('.'))]
-
+ if not (s.startswith('_[') or s.startswith('.'))]
+
for file in sys.argv[1:]:
print file
f = open(file)