Apply modified version of Collin Winter's patch #1478788
Renames functional extension module to _functools and adds a Python
functools module so that utility functions like update_wrapper can be
added easily.
diff --git a/Doc/lib/lib.tex b/Doc/lib/lib.tex
index cf657c3..0691179 100644
--- a/Doc/lib/lib.tex
+++ b/Doc/lib/lib.tex
@@ -129,8 +129,8 @@
% Functions, Functional, Generators and Iterators
% XXX intro functional
\input{libitertools}
-\input{libfunctional}
-\input{liboperator} % from runtime - better with itertools and functional
+\input{libfunctools}
+\input{liboperator} % from runtime - better with itertools and functools
% =============
diff --git a/Doc/lib/libfunctional.tex b/Doc/lib/libfunctools.tex
similarity index 92%
rename from Doc/lib/libfunctional.tex
rename to Doc/lib/libfunctools.tex
index 9218454..a25a23a 100644
--- a/Doc/lib/libfunctional.tex
+++ b/Doc/lib/libfunctools.tex
@@ -1,7 +1,7 @@
-\section{\module{functional} ---
+\section{\module{functools} ---
Higher order functions and operations on callable objects.}
-\declaremodule{standard}{functional} % standard library, in Python
+\declaremodule{standard}{functools} % standard library, in Python
\moduleauthor{Peter Harris}{scav@blueyonder.co.uk}
\moduleauthor{Raymond Hettinger}{python@rcn.com}
@@ -11,12 +11,12 @@
\versionadded{2.5}
-The \module{functional} module is for higher-order functions: functions
+The \module{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 \module{functional} module defines the following function:
+The \module{functools} module defines the following function:
\begin{funcdesc}{partial}{func\optional{,*args}\optional{, **keywords}}
Return a new \class{partial} object which when called will behave like