From 93fb5b64ea76183e9832da457e438507cbed85d0 Mon Sep 17 00:00:00 2001 From: Jakub Kuczys Date: Tue, 14 Oct 2025 01:42:08 +0200 Subject: [PATCH 1/3] Link to slice's data model docs in its Built-in Functions entry --- Doc/library/functions.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 61799e303a1639..78bf00f88db03d 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1827,6 +1827,8 @@ are always available. They are listed here in alphabetical order. :func:`itertools.islice` for an alternate version that returns an :term:`iterator`. + See also :ref:`slice-objects`. + .. versionchanged:: 3.12 Slice objects are now :term:`hashable` (provided :attr:`~slice.start`, :attr:`~slice.stop`, and :attr:`~slice.step` are hashable). From e64191003003089c3c1759e247f241707e1cb8d8 Mon Sep 17 00:00:00 2001 From: Jakub Kuczys Date: Tue, 14 Oct 2025 01:43:36 +0200 Subject: [PATCH 2/3] Link to slice's data model docs in its glossary entry --- Doc/glossary.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Doc/glossary.rst b/Doc/glossary.rst index c0ca0be304ebe4..4c8a34cee70577 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -1275,6 +1275,8 @@ Glossary when several are given, such as in ``variable_name[1:3:5]``. The bracket (subscript) notation uses :class:`slice` objects internally. + See also :ref:`slice-objects`. + soft deprecated A soft deprecated API should not be used in new code, but it is safe for already existing code to use it. From 0c3d821f0a5b022d951e8568de1e4a137d7c1a2a Mon Sep 17 00:00:00 2001 From: Jakub Kuczys Date: Tue, 14 Oct 2025 01:48:57 +0200 Subject: [PATCH 3/3] Make "slice objects" a link in Built-in Types --- Doc/library/stdtypes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 21fe35edc1bef8..3da06b950b92c8 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -5978,7 +5978,7 @@ Internal Objects See :ref:`types` for this information. It describes :ref:`stack frame objects `, -:ref:`traceback objects `, and slice objects. +:ref:`traceback objects `, and :ref:`slice objects `. .. _specialattrs: