diff options
author | Tim Peters <tim.peters@gmail.com> | 2004-08-04 02:36:18 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2004-08-04 02:36:18 (GMT) |
commit | 6db15d7307b831766617f6a9700ecc4c75a16081 (patch) | |
tree | cbc747970fd7d68844de8abaca57c8102dc859b2 /Lib/compiler | |
parent | cea2cc4a21e7e2ba84f6dc11682821e502bd1f5f (diff) | |
download | cpython-6db15d7307b831766617f6a9700ecc4c75a16081.zip cpython-6db15d7307b831766617f6a9700ecc4c75a16081.tar.gz cpython-6db15d7307b831766617f6a9700ecc4c75a16081.tar.bz2 |
Whitespace normalization.
Diffstat (limited to 'Lib/compiler')
-rw-r--r-- | Lib/compiler/ast.py | 4 | ||||
-rw-r--r-- | Lib/compiler/pycodegen.py | 4 | ||||
-rw-r--r-- | Lib/compiler/transformer.py | 10 |
3 files changed, 9 insertions, 9 deletions
diff --git a/Lib/compiler/ast.py b/Lib/compiler/ast.py index a81937f..6f585b7 100644 --- a/Lib/compiler/ast.py +++ b/Lib/compiler/ast.py @@ -607,7 +607,7 @@ class GenExpr(Node): self.code = code self.argnames = ['[outmost-iterable]'] self.varargs = self.kwargs = None - + def getChildren(self): @@ -785,7 +785,7 @@ class Lambda(Node): self.varargs = 1 if flags & CO_VARKEYWORDS: self.kwargs = 1 - + def getChildren(self): diff --git a/Lib/compiler/pycodegen.py b/Lib/compiler/pycodegen.py index e859ac5..e33551a 100644 --- a/Lib/compiler/pycodegen.py +++ b/Lib/compiler/pycodegen.py @@ -372,7 +372,7 @@ class CodeGenerator: ndecorators = len(node.decorators.nodes) else: ndecorators = 0 - + gen = self.FunctionGen(node, self.scopes, isLambda, self.class_name, self.get_module()) walk(node.code, gen) @@ -389,7 +389,7 @@ class CodeGenerator: else: self.emit('LOAD_CONST', gen) self.emit('MAKE_FUNCTION', len(node.defaults)) - + for i in range(ndecorators): self.emit('CALL_FUNCTION', 1) diff --git a/Lib/compiler/transformer.py b/Lib/compiler/transformer.py index 229657b..53a0fda 100644 --- a/Lib/compiler/transformer.py +++ b/Lib/compiler/transformer.py @@ -198,7 +198,7 @@ class Transformer: i += 2 return item - + def decorator(self, nodelist): # '@' dotted_name [ '(' [arglist] ')' ] assert len(nodelist) in (2, 4, 5) @@ -212,9 +212,9 @@ class Transformer: expr = self.com_call_function(funcname, nodelist[3]) else: expr = funcname - + return expr - + def decorators(self, nodelist): # decorators: decorator ([NEWLINE] decorator)* NEWLINE listlen = len(nodelist) @@ -228,7 +228,7 @@ class Transformer: if i < listlen and nodelist[i][0] == token.NEWLINE: i += 1 return Decorators(items) - + def funcdef(self, nodelist): # -6 -5 -4 -3 -2 -1 # funcdef: [decorators] 'def' NAME parameters ':' suite @@ -240,7 +240,7 @@ class Transformer: else: assert len(nodelist) == 5 decorators = None - + lineno = nodelist[-4][2] name = nodelist[-4][1] args = nodelist[-3][2] |