From 7ec81af7297f55081d2cb4721394ce1aedb0799b Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Sun, 18 Mar 2007 21:09:19 +0100 Subject: [PATCH] [svn] __radd__ and co now works for Undefined too --HG-- branch : trunk --- jinja/datastructure.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/jinja/datastructure.py b/jinja/datastructure.py index 7da8813..2b53a58 100644 --- a/jinja/datastructure.py +++ b/jinja/datastructure.py @@ -49,9 +49,8 @@ class UndefinedType(object): raise TypeError('cannot create %r instances' % self.__class__.__name__) - def __add__(self, other): - return other - __sub__ = __mul__ = __div__ = __add__ + __sub__ = __mul__ = __div__ = __rsub__ = __rmul__ = __div__ = __radd__ = \ + __add__ = lambda self, other: other def __getitem__(self, arg): return self -- 2.26.2