OpenQuizz
Une application de gestion des contenus pédagogiques
|
Additional Inherited Members | |
![]() | |
def | __init__ (self, hint=None, obj=missing, name=None, exc=UndefinedError) |
def | __getattr__ (self, name) |
def | __eq__ (self, other) |
def | __ne__ (self, other) |
def | __hash__ (self) |
def | __str__ (self) |
def | __len__ (self) |
def | __iter__ (self) |
def | __nonzero__ (self) |
def | __repr__ (self) |
An undefined that barks on print and iteration as well as boolean tests and all kinds of comparisons. In other words: you can do nothing with it except checking if it's defined using the `defined` test. >>> foo = StrictUndefined(name='foo') >>> str(foo) Traceback (most recent call last): ... jinja2.exceptions.UndefinedError: 'foo' is undefined >>> not foo Traceback (most recent call last): ... jinja2.exceptions.UndefinedError: 'foo' is undefined >>> foo + 42 Traceback (most recent call last): ... jinja2.exceptions.UndefinedError: 'foo' is undefined