[Python-3000] Making strings non-iterable

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Apr 18 02:08:08 CEST 2006


Tim Peters wrote:

> I expect it depends on whether someone writes text-processing
> algorithms.  If you do, it's quite natural to iterate over strings.

Personally I never find it natural to iterate over strings,
because it makes me think "this is going to be horrendously
inefficient", and I go looking for some way of doing what
I want en mass, using the existing string methods, or
regular expressions, or something.

That's why I didn't think it would have all that much
effect on real-life code. But maybe others aren't so
averse to string-iterating as I am.

--
Greg


More information about the Python-3000 mailing list