bug in str.startswith() and str.endswith()

Roy Smith roy at panix.com
Thu May 26 21:13:11 EDT 2011


In article <mailman.2136.1306451668.9059.python-list at python.org>,
 Ethan Furman <ethan at stoneleaf.us> wrote:

> --> 'this is a test'.startswith('this')
> True
> --> 'this is a test'.startswith('this', None, None)
> Traceback (most recent call last):
>    File "<stdin>", line 1, in <module>
> TypeError: slice indices must be integers or None or have an __index__ 
> method
[...]
> Any reason this is not a bug?

+1 for it being a bug.



More information about the Python-list mailing list