From c0da8654fac7f34ad2671c4423a5d782136825e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Delfino?= Date: Thu, 28 Jun 2018 11:59:59 -0300 Subject: [PATCH 1/8] bpo-6761: Fix __call__ documentation --- Doc/reference/datamodel.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index b6a6d48862bc66..624d43263b55ed 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -2108,7 +2108,8 @@ Emulating callable objects .. index:: pair: call; instance Called when the instance is "called" as a function; if this method is defined, - ``x(arg1, arg2, ...)`` is a shorthand for ``x.__call__(arg1, arg2, ...)``. + ``x(arguments)`` invokes the instance's class __call__ method, passing it the + instance object and all specified arguments. .. _sequence-types: From 6a4e25121d3bdbc59413dbf10c33b532419a9db6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Delfino?= Date: Thu, 28 Jun 2018 12:06:52 -0300 Subject: [PATCH 2/8] Minor fix --- Doc/reference/datamodel.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 624d43263b55ed..55eb091f718d78 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -2108,8 +2108,8 @@ Emulating callable objects .. index:: pair: call; instance Called when the instance is "called" as a function; if this method is defined, - ``x(arguments)`` invokes the instance's class __call__ method, passing it the - instance object and all specified arguments. + ``x(arguments)`` invokes the instance's class :meth:`__call__` method, passing + it the instance object and all specified arguments. .. _sequence-types: From b4880e0c35fa9e4d4b45d08064a503eb61d168f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Delfino?= Date: Thu, 28 Jun 2018 12:55:44 -0300 Subject: [PATCH 3/8] Minor change --- Doc/reference/datamodel.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 55eb091f718d78..ed982e0ffa92d1 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -2108,8 +2108,8 @@ Emulating callable objects .. index:: pair: call; instance Called when the instance is "called" as a function; if this method is defined, - ``x(arguments)`` invokes the instance's class :meth:`__call__` method, passing - it the instance object and all specified arguments. + ``x(arguments)`` invokes ``x``'s class :meth:`__call__` method, passing + it ``x`` and all specified arguments. .. _sequence-types: From 6235331a1016bc07b1bcc3cd84764b67c7913b1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Delfino?= Date: Thu, 28 Jun 2018 12:56:53 -0300 Subject: [PATCH 4/8] Minor change --- Doc/reference/datamodel.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index ed982e0ffa92d1..b135fd9de62739 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -2109,7 +2109,7 @@ Emulating callable objects Called when the instance is "called" as a function; if this method is defined, ``x(arguments)`` invokes ``x``'s class :meth:`__call__` method, passing - it ``x`` and all specified arguments. + it ``x`` and all specified ``arguments``. .. _sequence-types: From a671714c57d43e10e5750e1123b733ef7e6d75a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Delfino?= Date: Thu, 28 Jun 2018 17:03:21 -0300 Subject: [PATCH 5/8] Update datamodel.rst --- Doc/reference/datamodel.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index b135fd9de62739..5b8d320f819dc2 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -2109,7 +2109,7 @@ Emulating callable objects Called when the instance is "called" as a function; if this method is defined, ``x(arguments)`` invokes ``x``'s class :meth:`__call__` method, passing - it ``x`` and all specified ``arguments``. + ``x`` and all specified ``arguments`` to it. .. _sequence-types: From 860857d0ba4d31c6a05b7613757be57e45194338 Mon Sep 17 00:00:00 2001 From: Andre Delfino Date: Mon, 25 Feb 2019 07:23:48 -0300 Subject: [PATCH 6/8] Address comment from Victor --- Doc/reference/datamodel.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 5b8d320f819dc2..af8a3305039f5b 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -2108,8 +2108,8 @@ Emulating callable objects .. index:: pair: call; instance Called when the instance is "called" as a function; if this method is defined, - ``x(arguments)`` invokes ``x``'s class :meth:`__call__` method, passing - ``x`` and all specified ``arguments`` to it. + ``x(arg1, arg2, ...)`` invokes ``x``'s class :meth:`__call__` method, passing + ``x`` and all specified arguments. .. _sequence-types: From 73b5422ee7a33baccfc6003f8aa0a24aedcfb56c Mon Sep 17 00:00:00 2001 From: Andre Delfino Date: Tue, 5 Mar 2019 20:40:15 -0300 Subject: [PATCH 7/8] Address comment from Cheryl --- Doc/reference/datamodel.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index af8a3305039f5b..b6a7e0f6d86577 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -2108,8 +2108,7 @@ Emulating callable objects .. index:: pair: call; instance Called when the instance is "called" as a function; if this method is defined, - ``x(arg1, arg2, ...)`` invokes ``x``'s class :meth:`__call__` method, passing - ``x`` and all specified arguments. + the class receives the instance and all arguments of the call. .. _sequence-types: From 26cebc54e11d26786684a13bb1d482ac0f68fe33 Mon Sep 17 00:00:00 2001 From: Andre Delfino Date: Fri, 23 Oct 2020 11:01:21 -0300 Subject: [PATCH 8/8] Update datamodel.rst --- Doc/reference/datamodel.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index b6a7e0f6d86577..35e76c6e0a6514 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -2108,7 +2108,7 @@ Emulating callable objects .. index:: pair: call; instance Called when the instance is "called" as a function; if this method is defined, - the class receives the instance and all arguments of the call. + ``x(arg1, arg2, ...)`` roughly translates to ``type(x).__call__(x, arg1, ...)``. .. _sequence-types: