diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2006-02-27 16:03:39 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2006-02-27 16:03:39 (GMT) |
commit | 49a130295289174d32df603217dee0f00e874a5a (patch) | |
tree | 74b6cf8b40a953848c428e04dc4d56531d9f4462 /Lib | |
parent | fa443cda878b85abb83efb9674df4ff32f6d1b17 (diff) | |
download | cpython-49a130295289174d32df603217dee0f00e874a5a.zip cpython-49a130295289174d32df603217dee0f00e874a5a.tar.gz cpython-49a130295289174d32df603217dee0f00e874a5a.tar.bz2 |
Alias non-terminals introduced for backwards compatibility.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/compiler/transformer.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/compiler/transformer.py b/Lib/compiler/transformer.py index 924dcc7..65a69d4 100644 --- a/Lib/compiler/transformer.py +++ b/Lib/compiler/transformer.py @@ -278,6 +278,7 @@ class Transformer: code = self.com_node(nodelist[-1]) return Lambda(names, defaults, flags, code, lineno=nodelist[1][2]) + old_lambdef = lambdef def classdef(self, nodelist): # classdef: 'class' NAME ['(' [testlist] ')'] ':' suite @@ -572,6 +573,8 @@ class Transformer: if len(nodelist) == 1 and nodelist[0][0] == symbol.lambdef: return self.lambdef(nodelist[0]) return self.com_binary(Or, nodelist) + or_test = test + old_test = test def and_test(self, nodelist): # not_test ('and' not_test)* |