From 487852b18e15deed4e39165ce6809cf7bbd2ee52 Mon Sep 17 00:00:00 2001 From: Andrei Petre Date: Thu, 11 Oct 2018 20:41:47 -0700 Subject: [PATCH] bpo-34748: link to :ref:partial-objects in functools doc. --- Doc/library/functools.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Doc/library/functools.rst b/Doc/library/functools.rst index 7d59ec9187df454..408b25b7287380c 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` 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): @@ -247,7 +248,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` 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