New in version 2.5. The functools module is for higher-order
functions: functions that act on or return other functions. In
general, any callable object can be treated as a function for
the purposes of this module. The functools module defines the
following functions: This is the same function as reduce(). It
is made available in this module to allow writing code more
forward-compatible with Python 3. New in version 2.6. Return a
new partial object which when called will behave like func
called with the positional arguments args and keyword arguments
keywords. If more arguments are supplied to the call, they are
appended to args. If additional keyword arguments are supplied,
they extend and override keywords. Roughly equivalent to: def
partial(func, *args, **keywords): def newfunc(*fargs,
**fkeywords): newkeywords = keywords.copy()
newkeywords.update(fkeywords) return func(*(args + fargs),
**newkeywords) newfunc.func = func newfunc.args = args
newfunc.keywords = keywords return newfunc The partial() is used
f