This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Remove duplication between slice_indices and compute_slice_indices
Type: enhancement Stage: needs patch
Components: Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: mark.dickinson Nosy List: mark.dickinson, python-dev, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2012-11-10 14:57 by mark.dickinson, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue16451.patch mark.dickinson, 2012-11-12 20:52 review
Messages (3)
msg175281 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2012-11-10 14:57
(From #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.
msg175473 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2012-11-12 20:52
Patch attached.
msg175797 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-11-17 19:18
New changeset e9af9b1ca67e by Mark Dickinson in branch 'default':
Issue #16451: Refactor to remove duplication between range and slice in slice index computations.
http://hg.python.org/cpython/rev/e9af9b1ca67e
History
Date User Action Args
2022-04-11 14:57:38adminsetgithub: 60655
2012-11-17 19:22:43mark.dickinsonsetstatus: open -> closed
resolution: fixed
2012-11-17 19:18:28python-devsetnosy: + python-dev
messages: + msg175797
2012-11-12 20:52:32mark.dickinsonsetfiles: + issue16451.patch
keywords: + patch
messages: + msg175473
2012-11-12 07:39:11mark.dickinsonsetassignee: mark.dickinson
2012-11-10 14:58:03mark.dickinsonsetnosy: + serhiy.storchaka

stage: needs patch
2012-11-10 14:57:31mark.dickinsoncreate