summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorChris Jerdonek <chris.jerdonek@gmail.com>2012-11-14 10:13:28 (GMT)
committerChris Jerdonek <chris.jerdonek@gmail.com>2012-11-14 10:13:28 (GMT)
commit9e173ebde29fa3586c94d5bf0570547bca851ea9 (patch)
tree667fe34677cb8265126f9a4d85e356a186447eb9 /Doc
parent4a3a3f3bda8ab7092f85495451531c9373d6c9e1 (diff)
downloadcpython-9e173ebde29fa3586c94d5bf0570547bca851ea9.zip
cpython-9e173ebde29fa3586c94d5bf0570547bca851ea9.tar.gz
cpython-9e173ebde29fa3586c94d5bf0570547bca851ea9.tar.bz2
Link to "XRange Type" section in xrange() built-in function documentation.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/functions.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 0d4f912..5082479 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -1523,14 +1523,16 @@ available. They are listed here in alphabetical order.
.. function:: xrange(stop)
xrange(start, stop[, step])
- This function is very similar to :func:`range`, but returns an "xrange object"
+ This function is very similar to :func:`range`, but returns an :ref:`xrange
+ object <typesseq-xrange>`
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 :func:`xrange` over :func:`range` is minimal (since
:func:`xrange` still has to create the values when asked for them) except when a
very large range is used on a memory-starved machine or when all of the range's
elements are never used (such as when the loop is usually terminated with
- :keyword:`break`).
+ :keyword:`break`). For more information on xrange objects, see
+ :ref:`typesseq-xrange` and :ref:`typesseq`.
.. impl-detail::