[Python-checkins] python/dist/src/Doc/lib libstdtypes.tex,1.99,1.100
gvanrossum@users.sourceforge.net
gvanrossum@users.sourceforge.net
Tue, 16 Jul 2002 12:53:41 -0700
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv22868
Modified Files:
libstdtypes.tex
Log Message:
Record the decision that StopIteration is a sink state (see recent
discussion in python-dev with subject "Termination of two-arg iter()").
Implementation will follow.
Index: libstdtypes.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v
retrieving revision 1.99
retrieving revision 1.100
diff -C2 -d -r1.99 -r1.100
*** libstdtypes.tex 12 Jul 2002 17:15:10 -0000 1.99
--- libstdtypes.tex 16 Jul 2002 19:53:39 -0000 1.100
***************
*** 378,381 ****
--- 378,388 ----
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}}