On Wed, Jun 22, 2011 at 12:28 PM, Neal Becker <ndbeck...@gmail.com> wrote:

> AFAICT, the python iterator concept only supports readable iterators, not
> write.
> Is this true?
>
> for example:
>
> for e in sequence:
>  do something that reads e
>  e = blah # will do nothing
>
> I believe this is not a limitation on the for loop, but a limitation on the
> python iterator concept.  Is this correct?
>

The Generators, Iterators and Comprehensions 2011 document at the URL below
covers a way of doing this.

http://stromberg.dnsalias.org/~dstromberg/Intro-to-Python/
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to