On Thu, 2006-04-13 at 13:01 -0500, Ian Bicking wrote: > I propose that strings (unicode/text) shouldn't be iterable.
+1. I think I've mentioned before that we have a particular choke point that may get scalars or sequences, but that everything coming out of that choke point is guaranteed to be a sequence. You can use iter() on the thing, but you have to typecheck that it's not a basestring first. > Should bytes be iterable as well? Because bytes (the container) and > integers are not interchangeable, the problems that occur with strings > seem much less likely, and the container-like nature of bytes is > clearer. So I don't propose this effect bytes in any way. That seems right. bytes probably won't suffer from the Python String Photonic Effect (that they're both waves and particles, er, I mean sequences and scalars). -Barry
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
