Add (minimal) discussion about restartability.

This commit is contained in:
Guido van Rossum 2001-04-27 15:33:02 +00:00
parent 619a17e425
commit 072638b586
1 changed files with 4 additions and 0 deletions

View File

@ -168,6 +168,10 @@ Python API Specification
this may require an additional state bit for some iterator
implementations (e.g. function-wrapping iterators).
- Some folks have requested the ability to restart an iterator. I
believe this should be dealt with by calling iter() on a
sequence repeatedly, not by the iterator protocol itself.
- It was originally proposed that rather than having a next()
method, an iterator object should simply be callable. This was
rejected in favor of an explicit next() method. The reason is