summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorAndrei Petre <p31andrei@gmail.com>2018-10-23 06:11:20 (GMT)
committerXiang Zhang <angwerzx@126.com>2018-10-23 06:11:20 (GMT)
commit83a07652e0033f0d9994ae7634b91d6581c56b00 (patch)
treee285dcc2939d138c08d0a1894c3e4af25d01876c /Doc
parent3df85404d4bf420db3362eeae1345f2cad948a71 (diff)
downloadcpython-83a07652e0033f0d9994ae7634b91d6581c56b00.zip
cpython-83a07652e0033f0d9994ae7634b91d6581c56b00.tar.gz
cpython-83a07652e0033f0d9994ae7634b91d6581c56b00.tar.bz2
bpo-34748: link to :ref:`partial-objects` in functools.partial doc. (GH-9809)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/functools.rst11
1 files changed, 6 insertions, 5 deletions
diff --git a/Doc/library/functools.rst b/Doc/library/functools.rst
index ec3d5a5..40abdc2 100644
--- a/Doc/library/functools.rst
+++ b/Doc/library/functools.rst
@@ -205,10 +205,11 @@ The :mod:`functools` module defines the following functions:
.. function:: partial(func, *args, **keywords)
- Return a new :class:`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*.
+ Return a new :ref:`partial object<partial-objects>` 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):
@@ -246,7 +247,7 @@ The :mod:`functools` module defines the following functions:
:func:`classmethod`, :func:`staticmethod`, :func:`abstractmethod` or
another instance of :class:`partialmethod`), calls to ``__get__`` are
delegated to the underlying descriptor, and an appropriate
- :class:`partial` object returned as the result.
+ :ref:`partial object<partial-objects>` returned as the result.
When *func* is a non-descriptor callable, an appropriate bound method is
created dynamically. This behaves like a normal Python function when