iterbetter should throw error when iterated over twice
Bug #247742 reported by
Aaron Swartz
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 |
Changed in webpy: | |
milestone: | 0.35 → 0.31 |
Changed in webpy: | |
milestone: | 0.33 → 0.35 |
To post a comment you must log in.
That is not the expected behavior of iterators.
>>> x = iter(range(5))
>>> list(x)
[0, 1, 2, 3, 4]
>>> list(x)
[]
>>> list(x)
[]