[Python-3000] Making strings non-iterable
Barry Warsaw
barry at python.org
Tue Apr 18 06:00:23 CEST 2006
On Mon, 2006-04-17 at 16:08 -0700, Brian Harring wrote:
> The issue I'm seeing is that the wart you're pointing at is a general
> issue not limited to strings- everyone sooner or later has flattening
> code that hits the "recursively iterate over this container, except
> for instances of these classes".
I wouldn't want to generalize this, but it is not infrequent that people
mistakenly iterate over strings when they want to treat them atomically.
difflib not withstanding, and keeping Guido's pronouncement in mind, I
do think people want to treat strings atomically much more often then
they want to treat them as a sequence of characters.
nuff-said-moving-on-ly y'rs,
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 309 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/python-3000/attachments/20060418/cf391b0d/attachment-0001.pgp
More information about the Python-3000
mailing list