Skip to content

Glossary does not define "extended slicing" #76470

Open

Description

@stevendaprano
BPO 32289
Nosy @stevendaprano

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 = None
closed_at = None
created_at = <Date 2017-12-12.13:03:53.588>
labels = ['type-feature', 'docs']
title = 'Glossary does not define "extended slicing"'
updated_at = <Date 2017-12-12.13:03:53.588>
user = 'https://github.com/stevendaprano'

bugs.python.org fields:

activity = <Date 2017-12-12.13:03:53.588>
actor = 'steven.daprano'
assignee = 'docs@python'
closed = False
closed_date = None
closer = None
components = ['Documentation']
creation = <Date 2017-12-12.13:03:53.588>
creator = 'steven.daprano'
dependencies = []
files = []
hgrepos = []
issue_num = 32289
keywords = []
message_count = 1.0
messages = ['308125']
nosy_count = 3.0
nosy_names = ['steven.daprano', 'docs@python', 'Massimiliano Culpo']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue32289'
versions = []

Activity

  1. stevendaprano commented on Dec 12, 2017

    @stevendaprano
    MemberAuthor

    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

  2. added
    docs
    type-feature
    on Dec 12, 2017
  3. transferred this issue fromon Apr 10, 2022
  4. jacktose commented on Nov 1, 2022

    @jacktose

    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”.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docstype-feature

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions