polymerist.genutils.decorators.functional
Decorators for modifying functions
Attributes
Functions
|
Decorator function for allowing in-place (writeable) functions which modify object attributes |
|
Wrapper which allows a function which expects a single list-initializable, Container-like object to accept any Iterable (or even star-unpacked arguments) |
Module Contents
- polymerist.genutils.decorators.functional.T
- polymerist.genutils.decorators.functional.Params
- polymerist.genutils.decorators.functional.optional_in_place(funct: Callable[[Concatenate[object, Params]], None]) Callable[[Concatenate[object, Params]], object | None][source]
Decorator function for allowing in-place (writeable) functions which modify object attributes to be not performed in-place (i.e. read-only), specified by a boolean flag
- polymerist.genutils.decorators.functional.flexible_listlike_input(funct: Callable[[Iterator], T] = None, CastType: type[Iterator] = list, valid_member_types: type | tuple[type] = object) Callable[[Iterable], T][source]
Wrapper which allows a function which expects a single list-initializable, Container-like object to accept any Iterable (or even star-unpacked arguments)