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 Elizacat
Recipients Elizacat
Date 2016-07-11.01:04:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1468199048.87.0.686110972402.issue27479@psf.upfronthosting.co.za>
In-reply-to
Content
When slicing strings, IndexError is not raised when the slices are out of bounds, even for negative indexes. Like so:

>>> "test"[-1000:1000]
'test'

>>> "test"[-1000:1]
't'

>>> ""[-100:100]
''

This seems more like a bug than useful behaviour to me.
History
Date User Action Args
2016-07-11 01:04:08Elizacatsetrecipients: + Elizacat
2016-07-11 01:04:08Elizacatsetmessageid: <1468199048.87.0.686110972402.issue27479@psf.upfronthosting.co.za>
2016-07-11 01:04:08Elizacatlinkissue27479 messages
2016-07-11 01:04:08Elizacatcreate