Package buildbot :: Package status :: Package web :: Module base :: Class AlmostStrictUndefined
[frames] | no frames]

Class AlmostStrictUndefined

source code

                object --+        
                         |        
  jinja2.runtime.Undefined --+    
                             |    
jinja2.runtime.StrictUndefined --+
                                 |
                                AlmostStrictUndefined

An undefined that allows boolean testing but fails properly on every other use.

Much better than the default Undefined, but not fully as strict as StrictUndefined

Instance Methods
 
__nonzero__(self)
Regular callback function for undefined objects that raises an `UndefinedError` on call.
source code

Inherited from jinja2.runtime.StrictUndefined: __bool__, __eq__, __iter__, __len__, __ne__, __str__, __unicode__

Inherited from jinja2.runtime.Undefined: __add__, __call__, __complex__, __div__, __float__, __floordiv__, __ge__, __getattr__, __getitem__, __gt__, __init__, __int__, __le__, __lt__, __mod__, __mul__, __neg__, __pos__, __pow__, __radd__, __rdiv__, __repr__, __rfloordiv__, __rmod__, __rmul__, __rpow__, __rtruediv__, __truediv__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__nonzero__(self)
(Boolean test operator)

source code 

Regular callback function for undefined objects that raises an `UndefinedError` on call.

Overrides: jinja2.runtime.Undefined.__nonzero__