]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add item
authorAndrew M. Kuchling <amk@amk.ca>
Sun, 20 Mar 2005 19:52:18 +0000 (19:52 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Sun, 20 Mar 2005 19:52:18 +0000 (19:52 +0000)
Doc/whatsnew/whatsnew25.tex

index 3d5a32af59de2aaf959755c6c5b6f9e03f3d1e67..1a82844e5c80859002900519301b9f49c572f2ac 100644 (file)
@@ -120,7 +120,17 @@ Example:
 
 (Contributed by Raymond Hettinger.)
 
-% itertools.islice() now accepts None for the start and step arguments.
+\item The \function{itertools.islice()} function now accepts
+\code{None} for the start and step arguments.  This makes it more
+compatible with the attributes of slice objects, so that you can now write
+the following:
+
+\begin{verbatim}
+s = slice(5)     # Create slice object
+itertools.islice(iterable, s.start, s.stop, s.step)
+\end{verbatim}
+
+(Contributed by Raymond Hettinger.)
 
 \item New module: \module{spwd} provides functions for accessing the
 shadow password database on systems that support it.