Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove duplication between slice_indices and compute_slice_indices #60655

Closed
mdickinson opened this issue Nov 10, 2012 · 3 comments
Closed

Remove duplication between slice_indices and compute_slice_indices #60655

mdickinson opened this issue Nov 10, 2012 · 3 comments
Assignees
Labels
type-feature A feature request or enhancement

Comments

@mdickinson
Copy link
Member

BPO 16451
Nosy @mdickinson, @serhiy-storchaka
Files
  • issue16451.patch
  • 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 = 'https://github.com/mdickinson'
    closed_at = <Date 2012-11-17.19:22:43.812>
    created_at = <Date 2012-11-10.14:57:31.103>
    labels = ['type-feature']
    title = 'Remove duplication between slice_indices and compute_slice_indices'
    updated_at = <Date 2012-11-17.19:22:43.811>
    user = 'https://github.com/mdickinson'

    bugs.python.org fields:

    activity = <Date 2012-11-17.19:22:43.811>
    actor = 'mark.dickinson'
    assignee = 'mark.dickinson'
    closed = True
    closed_date = <Date 2012-11-17.19:22:43.812>
    closer = 'mark.dickinson'
    components = []
    creation = <Date 2012-11-10.14:57:31.103>
    creator = 'mark.dickinson'
    dependencies = []
    files = ['27973']
    hgrepos = []
    issue_num = 16451
    keywords = ['patch']
    message_count = 3.0
    messages = ['175281', '175473', '175797']
    nosy_count = 3.0
    nosy_names = ['mark.dickinson', 'python-dev', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'needs patch'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue16451'
    versions = ['Python 3.4']

    @mdickinson
    Copy link
    Member Author

    (From bpo-14794 ...)

    compute_slice_indices in Objects/rangeobject.c and slice_indices in Objects/sliceobject.c implement essentially the same algorithm. It would be nice to refactor to avoid the repetition.

    @mdickinson mdickinson added the type-feature A feature request or enhancement label Nov 10, 2012
    @mdickinson mdickinson self-assigned this Nov 12, 2012
    @mdickinson
    Copy link
    Member Author

    Patch attached.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Nov 17, 2012

    New changeset e9af9b1ca67e by Mark Dickinson in branch 'default':
    Issue bpo-16451: Refactor to remove duplication between range and slice in slice index computations.
    http://hg.python.org/cpython/rev/e9af9b1ca67e

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant