Skip to content
Myr

Clarify what operations the default "Undefined" supports (#1818)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Lord · committed by GitHub · parents 9849db5, 4e7850c · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:src/jinja2/runtime.py+2 added-2 removed
790 unmodified lines
791 return f"<{type(self).__name__} {name}>"792793794class Undefined:795 """The default undefined type. This undefined type can be printed and796 iterated over, but every other access will raise an :exc:`UndefinedError`:795 """The default undefined type. This can be printed, iterated, and treated as796 a boolean. Any other operation will raise an :exc:`UndefinedError`.797798 >>> foo = Undefined(name='foo')799 >>> str(foo)800 ''
256 unmodified lines