Skip to content

Commit

Permalink
Clarify what operations the default "Undefined" supports (#1818)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidism authored Dec 18, 2024
2 parents 9849db5 + 4e7850c commit da67299
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/jinja2/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,8 +792,8 @@ def __repr__(self) -> str:


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)
Expand Down

0 comments on commit da67299

Please sign in to comment.