[Python-ideas] An iterable version of find/index for strings?
Raymond Hettinger
raymond.hettinger at gmail.com
Fri Apr 5 09:42:43 CEST 2013
On Apr 4, 2013, at 6:21 PM, Tom Schumm <phong at phong.org> wrote:
> Should Python strings (and byte arrays, and other iterables for that matter)
> have an iterator form of find/rfind (or index/rindex)? I've found myself
> wanting one on occasion,
+1 from me.
As you say, the current pattern is awkward. Iterators are much more
natural for this task and would lead to cleaner, faster code.
Raymond
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130405/67654f45/attachment.html>
More information about the Python-ideas
mailing list