summaryrefslogtreecommitdiff
path: root/Doc
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2010-11-21 00:07:55 +0000
committerRaymond Hettinger <python@rcn.com>2010-11-21 00:07:55 +0000
commitfe502ea0e8b1d842e991f0b2bfe7364e15014a3f (patch)
treefc06a716da2299d7213ee789396c6cf3c6cc8b35 /Doc
parent0f44179422e2d3c470b267e207164efedfb9f26a (diff)
downloadcpython-git-fe502ea0e8b1d842e991f0b2bfe7364e15014a3f.tar.gz
Clean-up the description of the range object.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/stdtypes.rst10
1 files changed, 4 insertions, 6 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index f960bab116..30e55b1b63 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -1581,16 +1581,14 @@ Range Type
The :class:`range` type is an immutable sequence which is commonly used for
looping. The advantage of the :class:`range` type is that an :class:`range`
object will always take the same amount of memory, no matter the size of the
-range it represents. There are no consistent performance advantages.
+range it represents.
-Range objects have relatively little behavior: they support indexing,
-iteration, the :func:`len` function, and the following methods.
+Range objects have relatively little behavior: they support indexing, contains,
+iteration, the :func:`len` function, and the following methods:
.. method:: range.count(x)
- Return the number of *i*'s for which ``s[i] == x``. Normally the
- result will be 0 or 1, but it could be greater if *x* defines an
- unusual equality function.
+ Return the number of *i*'s for which ``s[i] == x``.
.. versionadded:: 3.2