kombu.utils.functional¶
-
class
kombu.utils.functional.
lazy
(fun, *args, **kwargs)¶ 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__()
.
-
evaluate
()¶
-
kombu.utils.functional.
is_list
(l, scalars=(<class '_abcoll.Mapping'>, <type 'basestring'>), iters=(<class '_abcoll.Iterable'>, ))¶ 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'>))¶ Return list of one element if
l
is a scalar.