diff options
author | Raymond Hettinger <python@rcn.com> | 2009-01-20 07:11:47 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2009-01-20 07:11:47 (GMT) |
commit | 230dd276283cd39756a907439a3e699e51fefa6e (patch) | |
tree | 0a47b276958425819c9a064f26534fddad48d0e9 | |
parent | ae3f068fb533b5c861912d865b9eedf5a6d5ba62 (diff) | |
download | cpython-230dd276283cd39756a907439a3e699e51fefa6e.zip cpython-230dd276283cd39756a907439a3e699e51fefa6e.tar.gz cpython-230dd276283cd39756a907439a3e699e51fefa6e.tar.bz2 |
Don't disrupt automatic url target name generation
with manually specified, conflicting names.
Before:
http://docs.python.org/dev/library/collections.html#id1
After:
http://docs.python.org/dev/library/collections.html#counter-objects
-rw-r--r-- | Doc/library/collections.rst | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index df6cd5a..46a2d62 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -152,8 +152,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 ------------------------ @@ -281,7 +279,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}) @@ -314,13 +312,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 @@ -469,8 +463,6 @@ Example: deque(['c', 'b', 'a']) -.. _deque-recipes: - :class:`deque` Recipes ^^^^^^^^^^^^^^^^^^^^^^ @@ -518,12 +510,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 @@ -569,8 +559,6 @@ in Unix:: ``None``, if absent. -.. _defaultdict-examples: - :class:`defaultdict` Examples ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -640,8 +628,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 ---------------------------------------------------------------- |