From: Clay Sweetser Date: Thu, 2 Mar 2023 21:53:14 +0000 (-0500) Subject: Clarify what operations the default Undefined supports X-Git-Tag: 3.1.5~31^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1818%2Fhead;p=thirdparty%2Fjinja.git Clarify what operations the default Undefined supports --- diff --git a/src/jinja2/runtime.py b/src/jinja2/runtime.py index 53582ae8..d10fe9d0 100644 --- a/src/jinja2/runtime.py +++ b/src/jinja2/runtime.py @@ -792,8 +792,8 @@ class Macro: class Undefined: - """The default undefined type. This undefined type can be printed and - iterated over, but every other access will raise an :exc:`UndefinedError`: + """The default undefined type. This can be printed, iterated, and treated as + a boolean. Any other operation will raise an :exc:`UndefinedError`. >>> foo = Undefined(name='foo') >>> str(foo)