summaryrefslogtreecommitdiffstats
path: root/Lib/compiler/symbols.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-10-18 21:57:37 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-10-18 21:57:37 (GMT)
commite0c446bb4ad67294f42d4cb53b4ff28413bd8dde (patch)
treeb4f286b4e6f2259ec47569561c4c62762e78b3f2 /Lib/compiler/symbols.py
parent8a57f00081b6f83168007fc701447d7926acc6c4 (diff)
downloadcpython-e0c446bb4ad67294f42d4cb53b4ff28413bd8dde.zip
cpython-e0c446bb4ad67294f42d4cb53b4ff28413bd8dde.tar.gz
cpython-e0c446bb4ad67294f42d4cb53b4ff28413bd8dde.tar.bz2
Whitespace normalization.
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)