functools.py - Tools for working with functions and callable objects
Functions
lru_cache([maxsize, typed])
lru_cache
Least-recently-used cache decorator.
singledispatch(func)
singledispatch
Single-dispatch generic function decorator.
total_ordering(cls)
total_ordering
Class decorator that fills in missing ordering methods
update_wrapper(wrapper, wrapped[, assigned, …])
update_wrapper
Update a wrapper function to look like the wrapped function
wraps(wrapped[, assigned, updated])
wraps
Decorator factory to apply update_wrapper() to a wrapper function
Classes
partial
partial(func, *args, **keywords) - new function with partial application of the given arguments and keywords.
partialmethod(func, *args, **keywords)
partialmethod
Method descriptor with partial application of the given arguments and keywords.