Skip to content

array.index() missing start and end #87050

Closed

Description

@danielnicorici
BPO 42884
Nosy @rhettinger, @ZackerySpytz
Superseder
  • bpo-31956: Add start and stop parameters to the array.index()
  • 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 = <Date 2022-03-19.22:41:58.652>
    created_at = <Date 2021-01-10.19:51:50.457>
    labels = ['type-feature', '3.10']
    title = 'array.index() missing start and end'
    updated_at = <Date 2022-03-19.22:41:58.652>
    user = 'https://bugs.python.org/danielnicorici'

    bugs.python.org fields:

    activity = <Date 2022-03-19.22:41:58.652>
    actor = 'iritkatriel'
    assignee = 'none'
    closed = True
    closed_date = <Date 2022-03-19.22:41:58.652>
    closer = 'iritkatriel'
    components = []
    creation = <Date 2021-01-10.19:51:50.457>
    creator = 'daniel.nicorici'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 42884
    keywords = []
    message_count = 2.0
    messages = ['384775', '384777']
    nosy_count = 3.0
    nosy_names = ['rhettinger', 'ZackerySpytz', 'daniel.nicorici']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '31956'
    type = 'enhancement'
    url = 'https://bugs.python.org/issue42884'
    versions = ['Python 3.10']

    Activity

    1. danielnicorici commented on Jan 10, 2021

      danielnicoricimannequin
      MannequinAuthor

      Add support for array.index(x [,start [,end]]). Adding start and end would allow to loop thru the entire array (and not start all the time from 0).

      Currently, is array.index(x) (and it returns the smallest i such that i is the index of the first occurrence of x in the array).

      For example, bytearray.index() has start and end and list.index() has also start and end, but for some reason start and end are missing from array.index.

    2. added
      3.10 (EOL)
      type-feature
      on Jan 10, 2021
    3. ZackerySpytz commented on Jan 10, 2021

      ZackerySpytzmannequin
      Mannequin

      This seems like a duplicate of bpo-31956.

    4. transferred this issue fromon Apr 10, 2022
    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

      3.10 (EOL)type-feature

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions