Whitespace normalization.

This commit is contained in:
Tim Peters 2001-10-18 21:57:37 +00:00
parent 8a57f00081
commit e0c446bb4a
19 changed files with 62 additions and 69 deletions

View file

@ -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)