From: Martin v. Löwis Date: Mon, 27 Feb 2006 16:03:39 +0000 (+0000) Subject: Alias non-terminals introduced for backwards compatibility. X-Git-Tag: v2.5a0~528 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=49a130295289174d32df603217dee0f00e874a5a;p=thirdparty%2FPython%2Fcpython.git Alias non-terminals introduced for backwards compatibility. --- diff --git a/Lib/compiler/transformer.py b/Lib/compiler/transformer.py index 924dcc7de508..65a69d46e83b 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)*