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 lemburg
Recipients Guillaume Sanchez, Socob, benjamin.peterson, ezio.melotti, lemburg, loewis, mrabarnett, r.david.murray, serhiy.storchaka, steven.daprano, terry.reedy, vstinner
Date 2017-08-03.14:11:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <39b7a8d7-fa49-8167-8e46-93ee204e7314@egenix.com>
In-reply-to <1501765532.54.0.799356866824.issue30717@psf.upfronthosting.co.za>
Content
On 03.08.2017 15:05, Guillaume Sanchez wrote:
> 
> Guillaume Sanchez added the comment:
> 
> I have a few criticism to do against that proto-PEP
> 
> http://mail.python.org/pipermail/python-dev/2001-July/015938.html
> 
> In particular, the fact that all those functions return an index prevents any state keeping.

If you want state keeping for iterating over multiple <indextype>
parts of the string, you can use an iterator.

The APIs were inspired by the standard string.find() APIs, that's
why they work on indexes and don't return Unicode strings. As
such, they serve a different use case than an iterator.

With the APIs, scanning would always start at the given index
in the string and move forward/backward to the start of the next
<indextype>.
History
Date User Action Args
2017-08-03 14:11:17lemburgsetrecipients: + lemburg, loewis, terry.reedy, vstinner, benjamin.peterson, ezio.melotti, mrabarnett, steven.daprano, r.david.murray, serhiy.storchaka, Socob, Guillaume Sanchez
2017-08-03 14:11:17lemburglinkissue30717 messages
2017-08-03 14:11:17lemburgcreate