class kombu.utils.functional.lazy(fun, *args, **kwargs)[source]

Holds lazy evaluation.

Evaluated when called or if the evaluate() method is called. The function is re-evaluated on every call.

Overloaded operations that will evaluate the promise:
__str__(), __repr__(), __cmp__().

Evaluates if the value is a lazy instance.

kombu.utils.functional.is_list(l, scalars=(<class '_abcoll.Mapping'>, <type 'basestring'>), iters=(<class '_abcoll.Iterable'>, ))[source]

Return true if the object is iterable (but not if object is a mapping or string).

kombu.utils.functional.maybe_list(l, scalars=(<class '_abcoll.Mapping'>, <type 'basestring'>))[source]

Return list of one element if l is a scalar.