PEP 234: Iterators

Michael Hudson mwh21 at
Tue May 1 13:30:56 EDT 2001

"Rainer Deyke" <root at> writes:

> "Michael Hudson" <mwh21 at> wrote in message
> news:m3d79t9j62.fsf at
> > Toby Dickenson <tdickenson at> writes:
> >
> > > What happens if you do violate this? I assume that damage is limited
> > > to seing elements twice, or skipping some elements and not seeing them
> > > at all.
> >
> > You (probably) get an exception.
> It would be nice if this could be made reliable.

Tricky, that.  It could be made somewhat more reliable, but I think
making it totally certain would have prohibitive drawbacks,
particularly as stuff like:

for i in d:
    d[i] += 1

*is* supported.


  You sound surprised.  We're talking about a government department
  here - they have procedures, not intelligence.
                                            -- Ben Hutchings, cam.misc

More information about the Python-list mailing list