Added optional None arguments to itertools.islice().

This commit is contained in:
Raymond Hettinger 2004-12-05 09:25:51 +00:00
parent d2f70cbe8e
commit b2594050ea
4 changed files with 27 additions and 14 deletions

View file

@ -261,6 +261,11 @@ by functions or loops that truncate the stream.
yield element
next += step
\end{verbatim}
If \var{start} is \code{None}, then iteration starts at zero.
If \var{step} is \code{None}, then the step defaults to one.
\versionchanged[accept \code{None} values for default \var{start} and
\var{step}]{2.5}
\end{funcdesc}
\begin{funcdesc}{izip}{*iterables}