class Undefined:
Known subclasses: jinja2.runtime.ChainableUndefined
, jinja2.runtime.DebugUndefined
, jinja2.runtime.StrictUndefined
The default undefined type. This undefined type can be printed and
iterated over, but every other access will raise an UndefinedError
:
>>> foo = Undefined(name='foo') >>> str(foo) '' >>> not foo True >>> foo + 42 Traceback (most recent call last): ... jinja2.exceptions.UndefinedError: 'foo' is undefined
Async Method | __aiter__ |
Undocumented |
Method | __bool__ |
Undocumented |
Method | __eq__ |
Undocumented |
Method | __getattr__ |
Undocumented |
Method | __hash__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | __iter__ |
Undocumented |
Method | __len__ |
Undocumented |
Method | __ne__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | __str__ |
Undocumented |
Method | _fail_with_undefined_error |
Raise an UndefinedError when operations are performed on the undefined value. |
Class Variable | __slots__ |
Undocumented |
Instance Variable | _undefined_exception |
Undocumented |
Instance Variable | _undefined_hint |
Undocumented |
Instance Variable | _undefined_name |
Undocumented |
Instance Variable | _undefined_obj |
Undocumented |
Property | _undefined_message |
Build a message about the undefined value based on how it was accessed. |
jinja2.runtime.ChainableUndefined
Undocumented
Parameters | |
name:str | Undocumented |
Returns | |
t.Any | Undocumented |
Undocumented
Parameters | |
hint:t.Optional[ | Undocumented |
obj:t.Any | Undocumented |
name:t.Optional[ | Undocumented |
exc:t.Type[ | Undocumented |
UndefinedError
when operations are performed
on the undefined value.Parameters | |
*args:t.Any | Undocumented |
**kwargs:t.Any | Undocumented |
Returns | |
te.NoReturn | Undocumented |
tuple[ str, ...]
=
jinja2.runtime.ChainableUndefined
, jinja2.runtime.DebugUndefined
, jinja2.runtime.StrictUndefined
Undocumented