Kaydet (Commit) 2d4b27ea authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Backport 1.100: Discussion of Stop Iteration in the Iterator Protocol.

üst 216c977b
......@@ -367,6 +367,13 @@ general and specific sequence types, dictionaries, and other more
specialized forms. The specific types are not important beyond their
implementation of the iterator protocol.
The intention of the protocol is that once an iterator's
\method{next()} method raises \exception{StopIteration}, it will
continue to do so on subsequent calls. Implementations that
do not obey this property are deemed broken. (This constraint
was added in Python 2.3; in Python 2.2, various iterators are
broken according to this rule.)
\subsection{Sequence Types \label{typesseq}}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment