summaryrefslogtreecommitdiffstats
path: root/Tools/compiler
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2000-02-17 22:06:20 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2000-02-17 22:06:20 (GMT)
commit7708d697ee38f5d8c61b88737e941a4d1eb49691 (patch)
treef793a53419e87854a19f00c47c461c97e0340a02 /Tools/compiler
parent873bdc18e4c80d955244267effc2f11249c2b93d (diff)
downloadcpython-7708d697ee38f5d8c61b88737e941a4d1eb49691.zip
cpython-7708d697ee38f5d8c61b88737e941a4d1eb49691.tar.gz
cpython-7708d697ee38f5d8c61b88737e941a4d1eb49691.tar.bz2
add varargs and kwargs flags to Lambda nodes
Diffstat (limited to 'Tools/compiler')
-rw-r--r--Tools/compiler/compiler/ast.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tools/compiler/compiler/ast.py b/Tools/compiler/compiler/ast.py
index 7a7a654..dfed562 100644
--- a/Tools/compiler/compiler/ast.py
+++ b/Tools/compiler/compiler/ast.py
@@ -105,6 +105,11 @@ class Lambda(Node):
self.flags = flags
self.code = code
self._children = ('lambda', argnames, defaults, flags, code)
+ self.varargs = self.kwargs = None
+ if flags & CO_VARARGS:
+ self.varargs = 1
+ if flags & CO_VARKEYWORDS:
+ self.kwargs = 1
def __repr__(self):
return "Lambda(%s,%s,%s,%s)" % self._children[1:]