Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #6357

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

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.linkpendium.com!news.linkpendium.com!panix!roy
From Roy Smith <roy@panix.com>
Newsgroups comp.lang.python
Subject Re: bug in str.startswith() and str.endswith()
Date Thu, 26 May 2011 21:13:11 -0400
Organization PANIX Public Access Internet and UNIX, NYC
Lines 14
Message-ID <roy-E793ED.21131126052011@news.panix.com> (permalink)
References <mailman.2136.1306451668.9059.python-list@python.org>
NNTP-Posting-Host localhost
X-Trace reader1.panix.com 1306458792 9371 127.0.0.1 (27 May 2011 01:13:12 GMT)
X-Complaints-To abuse@panix.com
NNTP-Posting-Date Fri, 27 May 2011 01:13:12 +0000 (UTC)
User-Agent MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:6357

Show key headers only | View raw


In article <mailman.2136.1306451668.9059.python-list@python.org>,
 Ethan Furman <ethan@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.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

bug in str.startswith() and str.endswith() Ethan Furman <ethan@stoneleaf.us> - 2011-05-26 16:27 -0700
  Re: bug in str.startswith() and str.endswith() Mel <mwilson@the-wire.com> - 2011-05-26 21:07 -0400
  Re: bug in str.startswith() and str.endswith() Roy Smith <roy@panix.com> - 2011-05-26 21:13 -0400
    Re: bug in str.startswith() and str.endswith() Stefan Behnel <stefan_ml@behnel.de> - 2011-05-27 06:47 +0200
      Re: bug in str.startswith() and str.endswith() Roy Smith <roy@panix.com> - 2011-05-27 09:48 -0400

csiph-web