utils
Utility functions
noop
noop (*args, **kwargs)
identity
identity (x)
safe_not_equal
safe_not_equal (a, b)
Check if a
is not equal to b
compose
compose (*functions)
Compose multiple functions left to right.
Examples:
compose()(x) = x
compose(f)(x) = f(x)
compose(f, g)(x) = g(f(x))
...
Type | Details | |
---|---|---|
functions | ||
Returns | typing.Callable[[typing.Any], typing.Any] | composed function |
NamedBunch
NamedBunch (name, **kw)
Bunch
Bunch (**kw)