projects
/
jinja2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab45b84
)
[svn] __radd__ and co now works for Undefined too
author
Armin Ronacher
<armin.ronacher@active-4.com>
Sun, 18 Mar 2007 20:09:19 +0000
(21:09 +0100)
committer
Armin Ronacher
<armin.ronacher@active-4.com>
Sun, 18 Mar 2007 20:09:19 +0000
(21:09 +0100)
--HG--
branch : trunk
jinja/datastructure.py
patch
|
blob
|
history
diff --git
a/jinja/datastructure.py
b/jinja/datastructure.py
index 7da8813e166d97e312face677b9e054ab1c7a175..2b53a5840494c7ed142c736e81d9775f67758fad 100644
(file)
--- 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