Mailing List Archive

python/dist/src/Doc/lib libstdtypes.tex,1.80.6.12,1.80.6.13
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv11024

Modified Files:
Tag: release22-maint
libstdtypes.tex
Log Message:
Backport 1.100: Discussion of Stop Iteration in the Iterator Protocol.


Index: libstdtypes.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v
retrieving revision 1.80.6.12
retrieving revision 1.80.6.13
diff -C2 -d -r1.80.6.12 -r1.80.6.13
*** libstdtypes.tex 19 Aug 2002 22:01:19 -0000 1.80.6.12
--- libstdtypes.tex 5 Oct 2002 15:38:16 -0000 1.80.6.13
***************
*** 368,371 ****
--- 368,378 ----
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}}