[Python-bugs-list] [ python-Bugs-723806 ] overintelligent slice() behavior on integers

SourceForge.net noreply@sourceforge.net
Fri, 18 Apr 2003 11:17:17 -0700


Bugs item #723806, was opened at 2003-04-18 11:17
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=723806&group_id=5470

Category: Python Interpreter Core
Group: Python 2.2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Russ Thompson (russt)
Assigned to: Nobody/Anonymous (nobody)
Summary: overintelligent slice() behavior on integers

Initial Comment:

slices such as a[:7] give a key of slice(0,7,None)
whereas a[:7.1] gives a key of slice(None,7.1,None)

Slices should not assume that the object indices
begin at zero, since that is actually a characteristic of 
the object.  The current behavior cripples an object that 
wants, say, to start its indices with negative numbers.

a[:7] should pass a key of slice(None,7,None).

Thanks!
russt@agilityfund.com


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=723806&group_id=5470