string: __iter__()?
Terry Reedy
tjreedy at udel.edu
Wed Oct 4 19:55:40 EDT 2006
"mrquantum" <mrquantum at holon.at> wrote in message
news:68c55$45238d46$506d0b9f$12642 at news.chello.at...
> Sorry, was to hasty by saying "... don't support the iteration
> protocol'! Sure they do, as the iter('SomeString') function or the
> construction for c in 'SomeString' show.
>
> It's just not implemented by a __iter__ method of the string in question!
I am sure this will change in 3.0 and possibly 2.x.
I believe the intention is that 'is iterable' will become the same as 'has
__iter__()'.
tjr
More information about the Python-list
mailing list