From d1ef7e0f43aa0dfa41667da3186a4df28664002c Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Sat, 29 May 2010 21:00:44 +0200 Subject: [PATCH] Fixed a Python 3 bug. --HG-- branch : trunk --- jinja2/runtime.py | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.26.2