bug in str.startswith() and str.endswith()
Roy Smith
roy at panix.com
Fri May 27 09:48:39 EDT 2011
In article <mailman.2144.1306471679.9059.python-list at python.org>,
Stefan Behnel <stefan_ml at behnel.de> wrote:
> Roy Smith, 27.05.2011 03:13:
> > Ethan Furman 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.
>
> Meaning that the right thing to do at this point is to file a bug report.
And now we just need to figure out if it's a bug in the code or the
documentation :-)
More information about the Python-list
mailing list