Skip to content

Commit 83a0765

Browse files
andreipzhangyangyu
authored andcommitted
bpo-34748: link to :ref:partial-objects in functools.partial doc. (GH-9809)
1 parent 3df8540 commit 83a0765

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
@@ -205,10 +205,11 @@ The :mod:`functools` module defines the following functions:
205205

206206
.. function:: partial(func, *args, **keywords)
207207

208-
Return a new :class:`partial` object which when called will behave like *func*
209-
called with the positional arguments *args* and keyword arguments *keywords*. If
210-
more arguments are supplied to the call, they are appended to *args*. If
211-
additional keyword arguments are supplied, they extend and override *keywords*.
208+
Return a new :ref:`partial object<partial-objects>` which when called
209+
will behave like *func* called with the positional arguments *args*
210+
and keyword arguments *keywords*. If more arguments are supplied to the
211+
call, they are appended to *args*. If additional keyword arguments are
212+
supplied, they extend and override *keywords*.
212213
Roughly equivalent to::
213214

214215
def partial(func, *args, **keywords):
@@ -246,7 +247,7 @@ The :mod:`functools` module defines the following functions:
246247
:func:`classmethod`, :func:`staticmethod`, :func:`abstractmethod` or
247248
another instance of :class:`partialmethod`), calls to ``__get__`` are
248249
delegated to the underlying descriptor, and an appropriate
249-
:class:`partial` object returned as the result.
250+
:ref:`partial object<partial-objects>` returned as the result.
250251

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

0 commit comments

Comments
 (0)