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 hkBst
Recipients hkBst
Date 2011-04-11.15:09:08
SpamBayes Score 3.8103147e-07
Marked as misclassified No
Message-id <1302534548.79.0.822537376297.issue11828@psf.upfronthosting.co.za>
In-reply-to
Content
startswith and endswith don't accept None as slice index, as shown by below interaction. Same behavior for python-3.1.3(with print()) and python-2.7.1. If instead this is intended behavior then the error message is wrong.

$ python -c "print 'abc'[-1:None]"
c
$ python -c "print 'abc'.endswith('c',-1,None)"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: slice indices must be integers or None or have an __index__ method
History
Date User Action Args
2011-04-11 15:09:08hkBstsetrecipients: + hkBst
2011-04-11 15:09:08hkBstsetmessageid: <1302534548.79.0.822537376297.issue11828@psf.upfronthosting.co.za>
2011-04-11 15:09:08hkBstlinkissue11828 messages
2011-04-11 15:09:08hkBstcreate