OpenQuizz
Une application de gestion des contenus pédagogiques
StrictUndefined Class Reference
Inheritance diagram for StrictUndefined:
Collaboration diagram for StrictUndefined:

Additional Inherited Members

- Public Member Functions inherited from Undefined
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)
 

Detailed Description

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

The documentation for this class was generated from the following file: