On 6/15/2013 8:53 AM, Tres Seaver wrote:

In fifteen years of Python programming, I have literally *never* wanted
to iterate over 'str' (or now 'bytes').

If so, it is because you have always been able to use pre-written methods and functions that internally do the iteration for you.

> I've always considered the fact
that Python made them iterable by default (rather than e.g. defining a
method / property to get to an iterable "view" on the underlying string)

.__iter__ is that method.

But this is off-topic for pydev.

--
Terry Jan Reedy

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to