mirror of
https://github.com/python/cpython.git
synced 2025-11-03 11:23:31 +00:00
The general iteration support is part of 2.2, not 2.1 -- fixed the version
annotations! Also fixed a typo noted by Neil S.
This commit is contained in:
parent
9cfe1824c2
commit
f42cc45f1b
2 changed files with 3 additions and 2 deletions
|
|
@ -243,6 +243,7 @@ Raised when an \keyword{assert} statement fails.
|
||||||
This is derived from \exception{Exception} rather than
|
This is derived from \exception{Exception} rather than
|
||||||
\exception{StandardError}, since this is not considered an error in
|
\exception{StandardError}, since this is not considered an error in
|
||||||
its normal application.
|
its normal application.
|
||||||
|
\versionadded{2.2}
|
||||||
\end{excdesc}
|
\end{excdesc}
|
||||||
|
|
||||||
\begin{excdesc}{SyntaxError}
|
\begin{excdesc}{SyntaxError}
|
||||||
|
|
|
||||||
|
|
@ -315,7 +315,7 @@ division by \code{pow(2, \var{n})} without overflow check.
|
||||||
|
|
||||||
\subsection{Iterator Types \label{typeiter}}
|
\subsection{Iterator Types \label{typeiter}}
|
||||||
|
|
||||||
\versionadded{2.1}
|
\versionadded{2.2}
|
||||||
\index{iterator protocol}
|
\index{iterator protocol}
|
||||||
\index{protocol!iterator}
|
\index{protocol!iterator}
|
||||||
\index{sequence!iteration}
|
\index{sequence!iteration}
|
||||||
|
|
@ -351,7 +351,7 @@ two methods, which together form the \dfn{iterator protocol}:
|
||||||
the Python/C API.
|
the Python/C API.
|
||||||
\end{methoddesc}
|
\end{methoddesc}
|
||||||
|
|
||||||
\begin{methoddesc}[iteratpr]{next}{}
|
\begin{methoddesc}[iterator]{next}{}
|
||||||
Return the next item from the container. If there are no further
|
Return the next item from the container. If there are no further
|
||||||
items, raise the \exception{StopIteration} exception. This method
|
items, raise the \exception{StopIteration} exception. This method
|
||||||
corresponds to the \member{tp_iternext} slot of the type structure
|
corresponds to the \member{tp_iternext} slot of the type structure
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue