diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-02-17 22:06:20 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-02-17 22:06:20 (GMT) |
commit | 7708d697ee38f5d8c61b88737e941a4d1eb49691 (patch) | |
tree | f793a53419e87854a19f00c47c461c97e0340a02 /Lib/compiler | |
parent | 873bdc18e4c80d955244267effc2f11249c2b93d (diff) | |
download | cpython-7708d697ee38f5d8c61b88737e941a4d1eb49691.zip cpython-7708d697ee38f5d8c61b88737e941a4d1eb49691.tar.gz cpython-7708d697ee38f5d8c61b88737e941a4d1eb49691.tar.bz2 |
add varargs and kwargs flags to Lambda nodes
Diffstat (limited to 'Lib/compiler')
-rw-r--r-- | Lib/compiler/ast.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/compiler/ast.py b/Lib/compiler/ast.py index 7a7a654..dfed562 100644 --- a/Lib/compiler/ast.py +++ b/Lib/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:] |