From 4e17d978ffd3d15ad1a63c4b59c032846368ddc5 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Thu, 14 Mar 2024 11:40:21 +0300 Subject: [PATCH 1/3] gh-116782: Mention `__type_params__` in `inspect.getmembers` docs --- Doc/library/inspect.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst index ed8d705da3b0b5..5abe22a2c859c7 100644 --- a/Doc/library/inspect.rst +++ b/Doc/library/inspect.rst @@ -55,6 +55,10 @@ attributes (see :ref:`import-mod-attrs` for module attributes): | | __module__ | name of module in which | | | | this class was defined | +-----------+-------------------+---------------------------+ +| | __type_params__ | :pep:`695` type | +| | | parameters of generic | +| | | classes | ++-----------+-------------------+---------------------------+ | method | __doc__ | documentation string | +-----------+-------------------+---------------------------+ | | __name__ | name with which this | @@ -103,6 +107,10 @@ attributes (see :ref:`import-mod-attrs` for module attributes): | | | reserved for return | | | | annotations. | +-----------+-------------------+---------------------------+ +| | __type_params__ | :pep:`695` type | +| | | parameters of generic | +| | | functions | ++-----------+-------------------+---------------------------+ | | __module__ | name of module in which | | | | this function was defined | +-----------+-------------------+---------------------------+ From 137951b4c0733e88fada7c3daa8dbb46921dfdb2 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Fri, 15 Mar 2024 15:12:03 +0300 Subject: [PATCH 2/3] Address review --- Doc/library/inspect.rst | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst index 5abe22a2c859c7..d33dbe1f166fc1 100644 --- a/Doc/library/inspect.rst +++ b/Doc/library/inspect.rst @@ -55,9 +55,10 @@ attributes (see :ref:`import-mod-attrs` for module attributes): | | __module__ | name of module in which | | | | this class was defined | +-----------+-------------------+---------------------------+ -| | __type_params__ | :pep:`695` type | -| | | parameters of generic | -| | | classes | +| | __type_params__ | A tuple containing the | +| | | :ref:`type ` | +| | | parameters of | +| | | a generic class | +-----------+-------------------+---------------------------+ | method | __doc__ | documentation string | +-----------+-------------------+---------------------------+ @@ -107,9 +108,10 @@ attributes (see :ref:`import-mod-attrs` for module attributes): | | | reserved for return | | | | annotations. | +-----------+-------------------+---------------------------+ -| | __type_params__ | :pep:`695` type | -| | | parameters of generic | -| | | functions | +| | __type_params__ | A tuple containing the | +| | | :ref:`type ` | +| | | parameters of | +| | | a generic function | +-----------+-------------------+---------------------------+ | | __module__ | name of module in which | | | | this function was defined | From 9884c6036a1f5d8172134fd195a7a16de8517fd9 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Fri, 15 Mar 2024 17:05:57 +0300 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Jelle Zijlstra --- Doc/library/inspect.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst index d33dbe1f166fc1..4a0a090facb8bb 100644 --- a/Doc/library/inspect.rst +++ b/Doc/library/inspect.rst @@ -56,8 +56,8 @@ attributes (see :ref:`import-mod-attrs` for module attributes): | | | this class was defined | +-----------+-------------------+---------------------------+ | | __type_params__ | A tuple containing the | -| | | :ref:`type ` | -| | | parameters of | +| | | :ref:`type parameters | +| | | ` of | | | | a generic class | +-----------+-------------------+---------------------------+ | method | __doc__ | documentation string | @@ -109,8 +109,8 @@ attributes (see :ref:`import-mod-attrs` for module attributes): | | | annotations. | +-----------+-------------------+---------------------------+ | | __type_params__ | A tuple containing the | -| | | :ref:`type ` | -| | | parameters of | +| | | :ref:`type parameters | +| | | ` of | | | | a generic function | +-----------+-------------------+---------------------------+ | | __module__ | name of module in which |