class documentation

The default undefined type. This undefined type can be printed and iterated over, but every other access will raise an :exc:`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
Class Variable __slots__ Undocumented
Method _fail_with_undefined_error Raise an :exc:`UndefinedError` when operations are performed on the undefined value.
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.
async def __aiter__(self): (source)

Undocumented

Returns
t.AsyncIterator[t.Any]Undocumented
def __bool__(self): (source)

Undocumented

Returns
boolUndocumented
def __eq__(self, other): (source)

Undocumented

Parameters
other:t.AnyUndocumented
Returns
boolUndocumented
@internalcode
def __getattr__(self, name): (source)

Undocumented

Parameters
name:strUndocumented
Returns
t.AnyUndocumented
def __hash__(self): (source)

Undocumented

Returns
intUndocumented
def __init__(self, hint=None, obj=missing, name=None, exc=UndefinedError): (source)

Undocumented

Parameters
hint:t.Optional[str]Undocumented
obj:t.AnyUndocumented
name:t.Optional[str]Undocumented
exc:t.Type[TemplateRuntimeError]Undocumented
def __iter__(self): (source)

Undocumented

Returns
t.Iterator[t.Any]Undocumented
def __len__(self): (source)

Undocumented

Returns
intUndocumented
def __ne__(self, other): (source)

Undocumented

Parameters
other:t.AnyUndocumented
Returns
boolUndocumented
def __repr__(self): (source)

Undocumented

Returns
strUndocumented
def __str__(self): (source)

Undocumented

Returns
strUndocumented
@internalcode
def _fail_with_undefined_error(self, *args, **kwargs): (source)

Raise an :exc:`UndefinedError` when operations are performed on the undefined value.

Parameters
*args:t.AnyUndocumented
**kwargs:t.AnyUndocumented
Returns
te.NoReturnUndocumented
_undefined_exception = (source)

Undocumented

_undefined_hint = (source)

Undocumented

_undefined_name = (source)

Undocumented

_undefined_obj = (source)

Undocumented

@property
_undefined_message: str = (source)

Build a message about the undefined value based on how it was accessed.