Sitelet https://github.com/python/cpython/issues/84783
Skip to content

slice not hashable #84783

Description

@WillBradshaw
BPO 40603
Nosy @rhettinger, @stevendaprano, @remilapeyre, @isdanni
Files
  • patches.zip: patch to add slicing functionality to slices
  • 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 2020-05-12.01:23:39.253>
    labels = ['interpreter-core', 'easy', 'type-feature', '3.9']
    title = 'slice not hashable'
    updated_at = <Date 2020-05-12.08:34:03.335>
    user = 'https://bugs.python.org/WillBradshaw'

    bugs.python.org fields:

    activity = <Date 2020-05-12.08:34:03.335>
    actor = 'remi.lapeyre'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Interpreter Core']
    creation = <Date 2020-05-12.01:23:39.253>
    creator = 'Will Bradshaw'
    dependencies = []
    files = ['49149']
    hgrepos = []
    issue_num = 40603
    keywords = ['easy (C)']
    message_count = 5.0
    messages = ['368693', '368694', '368696', '368700', '368708']
    nosy_count = 5.0
    nosy_names = ['rhettinger', 'steven.daprano', 'remi.lapeyre', 'isdanni', 'Will Bradshaw']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue40603'
    versions = ['Python 3.9']

    Linked PRs

    Activity

    1. WillBradshaw commented on May 12, 2020

      WillBradshawmannequin
      MannequinAuthor

      slice cannot be hashed which make some operations significantly more annoying. see https://groups.google.com/forum/#!topic/comp.lang.python/SvhkWwSDeIw

    2. stevendaprano commented on May 12, 2020

      @stevendaprano
      Member

      Please re-upload the patch file as an uncompressed text file, as it is quite difficult for many people to view zip files in their browser.

    3. changed the title [-]slice does not slice[/-] [+]slice not hashable[/+] on May 12, 2020
    4. changed the title [-]slice does not slice[/-] [+]slice not hashable[/+] on May 12, 2020
    5. added
      interpreter-core(Objects, Python, Grammar, and Parser dirs)
      type-featureA feature request or enhancement
      and removed
      type-bugAn unexpected behavior, bug, or error
      on May 12, 2020
    6. 20 remaining items

    7. added a commit that references this issue on Feb 22, 2023
    8. Yhg1s commented on Mar 9, 2023

      @Yhg1s
      Member

      GH-102548 adds the missing What's New entry.

    9. reopened this on Mar 9, 2023
    10. added a commit that references this issue on Mar 9, 2023
    11. hauntsaninja commented on Mar 11, 2023

      @hauntsaninja
      Contributor

      What's New was merged, so I think this can be closed

    12. added a commit that references this issue on Mar 31, 2023
    13. added a commit that references this issue on Apr 11, 2023
    14. asmeurer commented on Jul 16, 2023

      @asmeurer

      Thank you for fixing this.

      For anyone who was wanting hashable slices, my library ndindex may be of interest. It has a hashable Slice object but it also does a lot more like slice arithmetic which may be useful for a lot of the use cases described here.

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

    Metadata

    Metadata

    Assignees

    Labels

    3.12only security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)release-blockertype-featureA feature request or enhancement

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions