From: Armin Ronacher Date: Sat, 29 May 2010 19:00:44 +0000 (+0200) Subject: Fixed a Python 3 bug. X-Git-Tag: 2.5~9 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d1ef7e0f43aa0dfa41667da3186a4df28664002c;p=jinja2.git Fixed a Python 3 bug. --HG-- branch : trunk --- diff --git a/jinja2/runtime.py b/jinja2/runtime.py index 00b823e..98f4aec 100644 --- a/jinja2/runtime.py +++ b/jinja2/runtime.py @@ -528,6 +528,9 @@ class StrictUndefined(Undefined): __slots__ = () __iter__ = __unicode__ = __str__ = __len__ = __nonzero__ = __eq__ = \ __ne__ = Undefined._fail_with_undefined_error + if sys.version_info >= (3, 0): + __bool__ = __nonzero__ + del __nonzero__ # remove remaining slots attributes, after the metaclass did the magic they