[Python-ideas] An iterable version of find/index for strings?
Tom Schumm
phong at phong.org
Fri Apr 5 05:09:30 CEST 2013
On Friday, April 05, 2013 03:37:05 AM MRAB wrote:
> As you say, there's iteritems in Python 2. The os module has listdir,
> which returns a list; it has been suggested that an (non-list) iterable
> version should be added, and the obvious name in that case would be
> iterdir. The trend appears to be towards iterfind.
I agree that consistency would be best, and I'm not precious about the name.
:)
> You say "on occasion", but is that often enough to justify adding it to
> the language?
And that's why I ask; does anybody else want it? I've used it a few times, but
there are some string methods I've never used even once.
--
Tom Schumm
http://www.fwiffo.com/
More information about the Python-ideas
mailing list