summaryrefslogtreecommitdiffstats
path: root/Doc/library/collections.rst
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-01-20 07:15:22 (GMT)
committerRaymond Hettinger <python@rcn.com>2009-01-20 07:15:22 (GMT)
commit7bf3a0e866eb79c014daf931ee58cd3bcaa5e798 (patch)
treec48a97d210d0aaf706b1979e66fc8b81fef4c3d4 /Doc/library/collections.rst
parentcd372c6a650d9928a7c7eda64cbc7dca5dc9fe92 (diff)
downloadcpython-7bf3a0e866eb79c014daf931ee58cd3bcaa5e798.zip
cpython-7bf3a0e866eb79c014daf931ee58cd3bcaa5e798.tar.gz
cpython-7bf3a0e866eb79c014daf931ee58cd3bcaa5e798.tar.bz2
Forward port r68797: Fix-up jump targets in collections docs.
Diffstat (limited to 'Doc/library/collections.rst')
-rw-r--r--Doc/library/collections.rst16
1 files changed, 1 insertions, 15 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index 0984751..8b726fa 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -140,8 +140,6 @@ Notes on using :class:`Set` and :class:`MutableSet` as a mixin:
(For more about ABCs, see the :mod:`abc` module and :pep:`3119`.)
-.. _counter-objects:
-
:class:`Counter` objects
------------------------
@@ -269,7 +267,7 @@ of corresponding counts::
Counter({'a': 4, 'b': 3})
>>> c - d # subtract (keeping only positive counts)
Counter({'a': 2})
- >>> c & d # interection: min(c[x], d[x])
+ >>> c & d # intersection: min(c[x], d[x])
Counter({'a': 1, 'b': 1})
>>> c | d # union: max(c[x], d[x])
Counter({'a': 3, 'b': 2})
@@ -302,13 +300,9 @@ are undefined for negative inputs::
Section 4.6.3, Exercise 19
-
-.. _deque-objects:
-
:class:`deque` objects
----------------------
-
.. class:: deque([iterable[, maxlen]])
Returns a new deque object initialized left-to-right (using :meth:`append`) with
@@ -451,8 +445,6 @@ Example:
deque(['c', 'b', 'a'])
-.. _deque-recipes:
-
:class:`deque` Recipes
^^^^^^^^^^^^^^^^^^^^^^
@@ -500,12 +492,10 @@ in Unix::
'Return the last n lines of a file'
return deque(open(filename), n)
-.. _defaultdict-objects:
:class:`defaultdict` objects
----------------------------
-
.. class:: defaultdict([default_factory[, ...]])
Returns a new dictionary-like object. :class:`defaultdict` is a subclass of the
@@ -549,8 +539,6 @@ in Unix::
``None``, if absent.
-.. _defaultdict-examples:
-
:class:`defaultdict` Examples
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -620,8 +608,6 @@ Setting the :attr:`default_factory` to :class:`set` makes the
[('blue', set([2, 4])), ('red', set([1, 3]))]
-.. _named-tuple-factory:
-
:func:`namedtuple` Factory Function for Tuples with Named Fields
----------------------------------------------------------------