Skip to content

Commit fc62c72

Browse files
bpo-34748: link to :ref:partial-objects in functools.partial doc. (GH-9809)
(cherry picked from commit 83a0765) Co-authored-by: Andrei Petre <[email protected]>
1 parent 18450be commit fc62c72

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Doc/library/functools.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,11 @@ The :mod:`functools` module defines the following functions:
172172

173173
.. function:: partial(func, *args, **keywords)
174174

175-
Return a new :class:`partial` object which when called will behave like *func*
176-
called with the positional arguments *args* and keyword arguments *keywords*. If
177-
more arguments are supplied to the call, they are appended to *args*. If
178-
additional keyword arguments are supplied, they extend and override *keywords*.
175+
Return a new :ref:`partial object<partial-objects>` which when called
176+
will behave like *func* called with the positional arguments *args*
177+
and keyword arguments *keywords*. If more arguments are supplied to the
178+
call, they are appended to *args*. If additional keyword arguments are
179+
supplied, they extend and override *keywords*.
179180
Roughly equivalent to::
180181

181182
def partial(func, *args, **keywords):
@@ -214,7 +215,7 @@ The :mod:`functools` module defines the following functions:
214215
:func:`classmethod`, :func:`staticmethod`, :func:`abstractmethod` or
215216
another instance of :class:`partialmethod`), calls to ``__get__`` are
216217
delegated to the underlying descriptor, and an appropriate
217-
:class:`partial` object returned as the result.
218+
:ref:`partial object<partial-objects>` returned as the result.
218219

219220
When *func* is a non-descriptor callable, an appropriate bound method is
220221
created dynamically. This behaves like a normal Python function when

0 commit comments

Comments
 (0)