_Framework.Util (runtime)¶
Live 12 — Live Object Model & framework reference (descriptions and signatures).
Functions¶
chain_from_iterable(iterables)¶
clamp(val, minv, maxv)¶
compose(*funcs)¶
const(value)¶
contextmanager(func)¶
dict_diff(left, right)¶
find_if(predicate, seq)¶
first(seq)¶
flatten(list)¶
forward_property(member)¶
get_slice()¶
group(lst, n)¶
in_range(value, lower_bound, upper_open_bound)¶
index_if(predicate, seq)¶
infinite_context_manager(generator)¶
instance_decorator(decorator)¶
is_contextmanager(value)¶
is_iterable(value)¶
is_matrix(iterable)¶
linear(minv, maxv, val)¶
maybe(fn)¶
memoize(function)¶
mixin(*args)¶
monkeypatch(target, name=None, override=False, doc=None)¶
monkeypatch_extend(target, name=None)¶
negate(value)¶
next(iter)¶
nop(*a, **k)¶
old_hasattr(obj, attr)¶
print_message(*messages)¶
product(iter_a, iter_b)¶
recursive_map(fn, element, sequence_type=None)¶
reduce(...)¶
reduce(function, iterable[, initial]) -> value
Apply a function of two arguments cumulatively to the items of a sequence or iterable, from left to right, so as to reduce the iterable to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the iterable in the calculation, and serves as a default when the iterable is empty.
remove_if(predicate, lst)¶
second(seq)¶
sign(value)¶
slice_size(slice, width)¶
slicer(dimensions)¶
third(seq)¶
to_slice(obj)¶
trace_value(value, msg='Value: ')¶
union(a, b)¶
wraps(wrapped, assigned=('__module__', '__name__', '__qualname__', '__doc__', '__annotations__'), updated=('__dict__',))¶
Classes¶
class Bindable¶
Methods¶
__init__(self, /, *args, **kwargs)¶
Initialize self. See help(type(self)) for accurate signature.
bind(self, bind_to_object)¶
Attributes¶
_bound_instances=None
class BooleanContext¶
Properties¶
value
Methods¶
Manager(managed=None, update_value=None, *a, **k)¶
__call__(self, update_value=None)¶
Call self as a function.
__init__(self, default_value=None, *a, **k)¶
Initialize self. See help(type(self)) for accurate signature.
Attributes¶
default_value=False- bool(x) -> bool
class NamedTuple¶
Methods¶
__init__(self, *others, **k)¶
Initialize self. See help(type(self)) for accurate signature.
Attributes¶
_eq_dict=<_Framework.Util.lazy_attribute object at 0x129d83b50>
class Number¶
Methods¶
__init__(self, /, *args, **kwargs)¶
Initialize self. See help(type(self)) for accurate signature.
Attributes¶
_abc_impl=<_abc._abc_data object at 0x129c17580>- Internal state held by ABC machinery.
class Slicer¶
Methods¶
__call__(self)¶
Call self as a function.
__init__(self, dimensions=1, extractor=<function nop at 0x129d94040>, keys=(), *a, **k)¶
Initialize self. See help(type(self)) for accurate signature.
class chain¶
chain(*iterables) --> chain object
Return a chain object whose .next() method returns elements from the first iterable until it is exhausted, then elements from the next iterable, until all of the iterables are exhausted.
Methods¶
__init__(self, /, *args, **kwargs)¶
Initialize self. See help(type(self)) for accurate signature.
from_iterable(iterable, /)¶
Alternative chain() constructor taking a single iterable argument that evaluates lazily.
class lazy_attribute¶
Methods¶
__init__(self, func, name=None)¶
Initialize self. See help(type(self)) for accurate signature.
class overlaymap¶
Methods¶
__init__(self, *maps)¶
Initialize self. See help(type(self)) for accurate signature.
items(self)¶
keys(self)¶
values(self)¶
class partial¶
partial(func, args, *keywords) - new function with partial application of the given arguments and keywords.
Methods¶
__call__(self, /, *args, **kwargs)¶
Call self as a function.
__init__(self, /, *args, **kwargs)¶
Initialize self. See help(type(self)) for accurate signature.
Attributes¶
args=<member 'args' of 'functools.partial' objects>- tuple of arguments to future partial callsfunc=<member 'func' of 'functools.partial' objects>- function object to use in future partial callskeywords=<member 'keywords' of 'functools.partial' objects>- dictionary of keyword arguments to future partial calls
class zip_longest¶
zip_longest(iter1 [,iter2 [...]], [fillvalue=None]) --> zip_longest object
Return a zip_longest object whose .next() method returns a tuple where the i-th element comes from the i-th iterable argument. The .next() method continues until the longest iterable in the argument sequence is exhausted and then it raises StopIteration. When the shorter iterables are exhausted, the fillvalue is substituted in their place. The fillvalue defaults to None or can be specified by a keyword argument.
Methods¶
__init__(self, /, *args, **kwargs)¶
Initialize self. See help(type(self)) for accurate signature.