diff options
author | Guido van Rossum <guido@python.org> | 1994-02-24 11:28:27 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1994-02-24 11:28:27 (GMT) |
commit | 68cfbe7c93f8525da14ef419940df3c4b81f1ff4 (patch) | |
tree | 7a9ae6b7bd42f95b1be5864baff26254570ddb43 /Doc/libfuncs.tex | |
parent | 9f65ae0093e45eeadc5ed8c5cb3a9fc1f9b29f95 (diff) | |
download | cpython-68cfbe7c93f8525da14ef419940df3c4b81f1ff4.zip cpython-68cfbe7c93f8525da14ef419940df3c4b81f1ff4.tar.gz cpython-68cfbe7c93f8525da14ef419940df3c4b81f1ff4.tar.bz2 |
Documented xrange; crossreffed lambda a bit more
Diffstat (limited to 'Doc/libfuncs.tex')
-rw-r--r-- | Doc/libfuncs.tex | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/libfuncs.tex b/Doc/libfuncs.tex index e0b36f3..73bc145 100644 --- a/Doc/libfuncs.tex +++ b/Doc/libfuncs.tex @@ -354,3 +354,15 @@ its goal is to return a printable string. >>> if type(x) == type(''): print 'It is a string' \end{verbatim}\ecode \end{funcdesc} + +\begin{funcdesc}{xrange}{start\, end\, step} +This function is very similar to \code{range()}, but returns an +``xrange object'' instead of a list. This is an opaque sequence type +which yields the same values as the corresponding list, without +actually storing them all simultaneously. The advantage of +\code{xrange()} over \code{range()} is minimal (since \code{xrange()} +still has to create the values when asked for them) except when a very +large range is used on a memory-starved machine (e.g. DOS) or when all +of the range's elements are never used (e.g. when the loop is usually +terminated with \code{break}). +\end{funcdesc} |