PEP 234: Iterators
mwh21 at cam.ac.uk
Tue May 1 19:30:56 CEST 2001
"Rainer Deyke" <root at rainerdeyke.com> writes:
> "Michael Hudson" <mwh21 at cam.ac.uk> wrote in message
> news:m3d79t9j62.fsf at atrus.jesus.cam.ac.uk...
> > Toby Dickenson <tdickenson at devmail.geminidataloggers.co.uk> 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
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