From 0c83a1578b5372cdea115b2246da35b691257d41 Mon Sep 17 00:00:00 2001 From: Rob Reynolds Date: Tue, 20 May 2025 14:53:11 -0600 Subject: [PATCH 1/2] Update functions.rst Paragraph should not be under `slice.step`. It applies to the whole class. --- Doc/library/functions.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 7e367a0f2b6b25..8fee838ba09492 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1843,10 +1843,10 @@ are always available. They are listed here in alphabetical order. .. attribute:: slice.stop .. attribute:: slice.step - Slice objects have read-only data attributes :attr:`!start`, - :attr:`!stop`, and :attr:`!step` which merely return the argument - values (or their default). They have no other explicit functionality; - however, they are used by NumPy and other third-party packages. + Slice objects have read-only data attributes :attr:`!start`, + :attr:`!stop`, and :attr:`!step` which merely return the argument + values (or their default). They have no other explicit functionality; + however, they are used by NumPy and other third-party packages. Slice objects are also generated when extended indexing syntax is used. For example: ``a[start:stop:step]`` or ``a[start:stop, i]``. See From 36b96669d4729f31318b53367f36a62a2814526b Mon Sep 17 00:00:00 2001 From: Rob Reynolds <13379223+reynoldsnlp@users.noreply.github.com> Date: Wed, 25 Jun 2025 08:32:46 -0600 Subject: [PATCH 2/2] Move paragraph above attributes --- Doc/library/functions.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 0af821ad427064..80bd1275973f8d 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1839,15 +1839,15 @@ are always available. They are listed here in alphabetical order. ``range(start, stop, step)``. The *start* and *step* arguments default to ``None``. - .. attribute:: slice.start - .. attribute:: slice.stop - .. attribute:: slice.step - Slice objects have read-only data attributes :attr:`!start`, :attr:`!stop`, and :attr:`!step` which merely return the argument values (or their default). They have no other explicit functionality; however, they are used by NumPy and other third-party packages. + .. attribute:: slice.start + .. attribute:: slice.stop + .. attribute:: slice.step + Slice objects are also generated when extended indexing syntax is used. For example: ``a[start:stop:step]`` or ``a[start:stop, i]``. See :func:`itertools.islice` for an alternate version that returns an