[Python-3000] Making strings non-iterable

Aahz aahz at pythoncraft.com
Mon Apr 17 05:29:30 CEST 2006


On Sun, Apr 16, 2006, Tim Peters wrote:
>
> Now that I think of it, though, I've been burned perhaps twice in my
> total Python life by recursing on a string when I didn't intend to. 
> Apart from flatten()-ish functions, I'm not sure I've written anything
> vulnerable to that.

I've been burned a few times, but only because I was expecting a list
input and got a string.  I think that improving code analysis tools and
making better use of unit tests is the proper cure for that.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"LL YR VWL R BLNG T S"


More information about the Python-3000 mailing list