polymerist.genutils.decorators.functional ========================================= .. py:module:: polymerist.genutils.decorators.functional .. autoapi-nested-parse:: Decorators for modifying functions Attributes ---------- .. autoapisummary:: polymerist.genutils.decorators.functional.T polymerist.genutils.decorators.functional.Params Functions --------- .. autoapisummary:: polymerist.genutils.decorators.functional.optional_in_place polymerist.genutils.decorators.functional.flexible_listlike_input Module Contents --------------- .. py:data:: T .. py:data:: Params .. py:function:: optional_in_place(funct: Callable[[Concatenate[object, Params]], None]) -> Callable[[Concatenate[object, Params]], Optional[object]] 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 .. py:function:: flexible_listlike_input(funct: Callable[[Iterator], T] = None, CastType: type[Iterator] = list, valid_member_types: Union[type, tuple[type]] = object) -> Callable[[Iterable], T] Wrapper which allows a function which expects a single list-initializable, Container-like object to accept any Iterable (or even star-unpacked arguments)