circuitpython_functools
¶
A CircuitPython implementation of CPython’s functools library. Note that this implementation is not a 1-to-1 replica, but rather provides the same functionality with minor differences in usage.
Author(s): Alec Delaney
Implementation Notes¶
Software and Dependencies:
Adafruit CircuitPython firmware for the supported boards: https://circuitpython.org/downloads
- circuitpython_functools.cache(user_function)¶
Unbounded cache
- circuitpython_functools.clear_caches()¶
Clears all the caches
- circuitpython_functools.partial(func, *args, **kwargs)¶
Creates a partial of the function
- circuitpython_functools.wraps(wrapped, assigned=None, updated=None)¶
Defines a wrapper function when writing function decorators