You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Glossary does not define "extended slicing" #76470
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=Nonecreated_at=<Date2017-12-12.13:03:53.588>labels= ['type-feature', 'docs']
title='Glossary does not define "extended slicing"'updated_at=<Date2017-12-12.13:03:53.588>user='https://github.com/stevendaprano'
Looking at bpo-32288, I realised that the glossary doesn't define "extended slicing" or "extended slice", even though they are common terms. Although I thought I know what they meant, on closer reflection I realised I wasn't sure.
Does extended slicing refer to slice *objects* with a stride/step, as opposed to slice objects all the way back in Python 1.3 (yes, *one* point 3) that only had start and end?
Does it refer specifically to the two-colon form of slice *syntax*?
This frustrated me when trying to understand Ellipsis (emphasis mine):
Ellipsis
The same as the ellipsis literal “...”. Special value used mostly in conjunction with extended slicing syntax for user-defined container data types. Ellipsis is the sole instance of the types.EllipsisType type.
I also only found What's New in Python 2.3 § 15 Extended Slices, from which I infer that it means slices with the step argument, or slices with the step argument, when applied to “Python's built-in list, tuple, and string sequence types”.
Activity
stevendaprano commentedon Dec 12, 2017
Looking at bpo-32288, I realised that the glossary doesn't define "extended slicing" or "extended slice", even though they are common terms. Although I thought I know what they meant, on closer reflection I realised I wasn't sure.
Does extended slicing refer to slice *objects* with a stride/step, as opposed to slice objects all the way back in Python 1.3 (yes, *one* point 3) that only had start and end?
Does it refer specifically to the two-colon form of slice *syntax*?
Both? Neither?
https://docs.python.org/3/glossary.html#term-slice
The only documentation I found is from the 2.3 What's New:
https://docs.python.org/2.3/whatsnew/section-slices.html
jacktose commentedon Nov 1, 2022
This frustrated me when trying to understand Ellipsis (emphasis mine):
I also only found What's New in Python 2.3 § 15 Extended Slices, from which I infer that it means slices with the step argument, or slices with the step argument, when applied to “Python's built-in list, tuple, and string sequence types”.