Skip to content

_Framework.Util

Module constants

  • get_slice

Classes

class lazy_attribute(object)

Bases: object

__init__(self, func, name)

__get__(self, obj, cls)

class BooleanContext(object)

Bases: object

Attributes

  • default_value = False

__init__(self, default_value, *a, **k)

__bool__(self)

__call__(self, update_value)

value(self)

class Manager(object)

Bases: object

__init__(self, managed, update_value, *a, **k)
__enter__(self)
__exit__(self, *a, **k)

class NamedTuple(object)

Bases: object

__init__(self, *others, **k)

__setattr__(self, name, value)

__delattr__(self, name)

__getitem__(self, name)

_eq_dict(self)

__eq__(self, other)

__hash__(self)

__getstate__(self)

class Slicer(object)

Bases: object

__init__(self, dimensions, extractor, keys, *a, **k)

__getitem__(self, key)

__call__(self)

class overlaymap(object)

Bases: object

__init__(self, *maps)

__getitem__(self, key)

keys(self)

values(self)

items(self)

class Bindable(object)

Bases: object

Attributes

  • _bound_instances = None

__get__(self, obj, cls)

bind(self, bind_to_object)

Functions

clamp(val, minv, maxv)

linear(minv, maxv, val)

nop(*a, **k)

negate(value)

const(value)

in_range(value, lower_bound, upper_open_bound)

sign(value)

to_slice(obj)

slice_size(slice, width)

maybe(fn)

memoize(function)

mixin(*args)

monkeypatch(target, name, override, doc)

monkeypatch_extend(target, name)

instance_decorator(decorator)

forward_property(member)

remove_if(predicate, lst)

flatten(list)

group(lst, n)

find_if(predicate, seq)

index_if(predicate, seq)

union(a, b)

product(iter_a, iter_b)

next(iter)

is_iterable(value)

recursive_map(fn, element, sequence_type)

chain_from_iterable(iterables)

is_matrix(iterable)

first(seq)

second(seq)

third(seq)

compose(*funcs)

is_contextmanager(value)

infinite_context_manager(generator)

dict_diff(left, right)

slicer(dimensions)

trace_value(value, msg)