summaryrefslogtreecommitdiff
path: root/Doc/library/functools.rst
diff options
context:
space:
mode:
author?ukasz Langa <lukasz@langa.pl>2013-06-07 22:54:03 +0200
committer?ukasz Langa <lukasz@langa.pl>2013-06-07 22:54:03 +0200
commit14e98cd7659e3c47e8a423d59e6b468556136637 (patch)
tree8d0d0a47f055203dabfa9464285fbb6d9c4fa687 /Doc/library/functools.rst
parent457784cec42d03d3aefeea1b5e32b74876fb256b (diff)
downloadcpython-14e98cd7659e3c47e8a423d59e6b468556136637.tar.gz
moved the single-dispatch generic function definitions to the glossary
Diffstat (limited to 'Doc/library/functools.rst')
-rw-r--r--Doc/library/functools.rst8
1 files changed, 2 insertions, 6 deletions
diff --git a/Doc/library/functools.rst b/Doc/library/functools.rst
index 5ee07a75c8..3d70955c58 100644
--- a/Doc/library/functools.rst
+++ b/Doc/library/functools.rst
@@ -189,12 +189,8 @@ The :mod:`functools` module defines the following functions:
.. decorator:: singledispatch(default)
- Transforms a function into a single-dispatch generic function. A **generic
- function** is composed of multiple functions implementing the same operation
- for different types. Which implementation should be used during a call is
- determined by the dispatch algorithm. When the implementation is chosen
- based on the type of a single argument, this is known as **single
- dispatch**.
+ Transforms a function into a :term:`single-dispatch <single
+ dispatch>` :term:`generic function`.
To define a generic function, decorate it with the ``@singledispatch``
decorator. Note that the dispatch happens on the type of the first argument,