[Python-bugs-list] [ python-Bugs-723806 ] overintelligent slice() behavior on integers
SourceForge.net
noreply@sourceforge.net
Tue, 10 Jun 2003 14:45:59 -0700
Bugs item #723806, was opened at 2003-04-18 11:17
Message generated for change (Comment added) made by bcannon
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
----------------------------------------------------------------------
>Comment By: Brett Cannon (bcannon)
Date: 2003-06-10 14:45
Message:
Logged In: YES
user_id=357491
How does having 'slice' not round its arguments have anything
to do with assuming indices start at zero?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=723806&group_id=5470