bpo-34748: link to :ref:partial-objects in functools.partial doc. (… · python/cpython@83a0765 (original) (raw)

Original file line number Diff line number Diff line change
@@ -205,10 +205,11 @@ The :mod:`functools` module defines the following functions:
205 205
206 206 .. function:: partial(func, *args, **keywords)
207 207
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` 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*.
212 213 Roughly equivalent to::
213 214
214 215 def partial(func, *args, **keywords):
@@ -246,7 +247,7 @@ The :mod:`functools` module defines the following functions:
246 247 :func:`classmethod`, :func:`staticmethod`, :func:`abstractmethod` or
247 248 another instance of :class:`partialmethod`), calls to ``__get__`` are
248 249 delegated to the underlying descriptor, and an appropriate
249 -:class:`partial` object returned as the result.
250 +:ref:`partial object` returned as the result.
250 251
251 252 When *func* is a non-descriptor callable, an appropriate bound method is
252 253 created dynamically. This behaves like a normal Python function when