Skip to content

LaxUndefined

Base classes

Name Children Inherits
Undefined
jinja2.runtime
The default undefined type. This can be printed, iterated, and treated as

⋔ Inheritance diagram

graph TD
  97041655580576["undefined.LaxUndefined"]
  97041655436160["runtime.Undefined"]
  128674497047040["builtins.object"]
  97041655436160 --> 97041655580576
  128674497047040 --> 97041655436160

🛈 DocStrings

Bases: Undefined

Pass anything wrong as blank.

Source code in src/jinjarope/undefined.py
class LaxUndefined(jinja2.Undefined):
    """Pass anything wrong as blank."""

    def _fail_with_undefined_error(self, *args: Any, **kwargs: Any) -> str:  # ty: ignore[incompatible-method-override]
        return ""

:fa-brands-github: Show source on GitHub