iterbetter should throw error when iterated over twice

Bug #247742 reported by Aaron Swartz
2
Affects Status Importance Assigned to Milestone
web.py
Confirmed
Low
Anand Chitipothu

Bug Description

People are getting confused when they try to iterate over an iterbetter twice. Can't we just have it throw an error if they try to iterate past the end?

Changed in webpy:
assignee: nobody → anandology
importance: Undecided → Low
milestone: none → 0.3
status: New → Confirmed
Changed in webpy:
milestone: 0.3 → 0.35
Aaron Swartz (aaronsw)
Changed in webpy:
milestone: 0.35 → 0.31
Revision history for this message
Anand Chitipothu (anandology) wrote :

That is not the expected behavior of iterators.

>>> x = iter(range(5))
>>> list(x)
[0, 1, 2, 3, 4]
>>> list(x)
[]
>>> list(x)
[]

Changed in webpy:
milestone: 0.32 → 0.33
Changed in webpy:
milestone: 0.33 → 0.35
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.