PyDocs

Functional Programming Modules

Functional Programming Modules

functools

functools.py - Tools for working with functions and callable objects
Symbols in functools

c

cache
Simple lightweight unbounded cache.
cached_property
Transform a method of a class into a property whose value is computed once and then cached as a normal attribute for the life of the instance.
cmp_to_key
Convert a cmp= function into a key= function.

l

lru_cache
Least-recently-used cache decorator.

p

partial
Create a new function with partial application of the given arguments and keywords.
partialmethod
Method descriptor with partial application of the given arguments and keywords.
Placeholder
A singleton object used as a sentinel to reserve a place for positional arguments when calling partial() and partialmethod().

r

reduce
Apply a function of two arguments cumulatively to the items of an iterable, from left to right.

s

singledispatch
Single-dispatch generic function decorator.
singledispatchmethod
Single-dispatch generic method descriptor.

t

total_ordering
Class decorator that fills in missing ordering methods

u

update_wrapper
Update a wrapper function to look like the wrapped function

w

wraps
Decorator factory to apply update_wrapper() to a wrapper function