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.

Author russt
Recipients
Date 2003-06-10.22:23:14
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=760126


'slice' doesn't round its arguments.  The difference
is whether you pass an integer or a float as part
of the slice.  Thus:
a[:7] gives a key of slice(0,7,None)
while
a[:7.0] gives a key of slice(None,7.0,None)

What's going on I suspect is that the python
has two different behaviours for __getitem__.
The first handles slices with integer only
components, and defaults to starting at zero.
The second handles anything else.  This is
probably done in order to accomodate old 
'list' and 'tuple' implementation code that doesn't
accept starting indices of None.  But the best
solution would be to eliminate the dual behavior
of slice and revise the list and tuple code to 
accept the more general behavior.
History
Date User Action Args
2007-08-23 14:12:32adminlinkissue723806 messages
2007-08-23 14:12:32admincreate