Fix a typo and remove some unneeded markup

This commit is contained in:
Éric Araujo 2011-08-19 09:00:56 +02:00
parent a5afa4955d
commit f06568cbd8
1 changed files with 5 additions and 6 deletions

View File

@ -202,14 +202,14 @@ counts, but the output will exclude results with counts of zero or less.
* `Bag class <http://www.gnu.org/software/smalltalk/manual-base/html_node/Bag.html>`_ * `Bag class <http://www.gnu.org/software/smalltalk/manual-base/html_node/Bag.html>`_
in Smalltalk. in Smalltalk.
* Wikipedia entry for `Multisets <http://en.wikipedia.org/wiki/Multiset>`_\. * Wikipedia entry for `Multisets <http://en.wikipedia.org/wiki/Multiset>`_.
* `C++ multisets <http://www.demo2s.com/Tutorial/Cpp/0380__set-multiset/Catalog0380__set-multiset.htm>`_ * `C++ multisets <http://www.demo2s.com/Tutorial/Cpp/0380__set-multiset/Catalog0380__set-multiset.htm>`_
tutorial with examples. tutorial with examples.
* For mathematical operations on multisets and their use cases, see * For mathematical operations on multisets and their use cases, see
*Knuth, Donald. The Art of Computer Programming Volume II, *Knuth, Donald. The Art of Computer Programming Volume II,
Section 4.6.3, Exercise 19*\. Section 4.6.3, Exercise 19*.
* To enumerate all distinct multisets of a given size over a given set of * To enumerate all distinct multisets of a given size over a given set of
elements, see :func:`itertools.combinations_with_replacement`. elements, see :func:`itertools.combinations_with_replacement`.
@ -453,8 +453,7 @@ stack manipulations such as ``dup``, ``drop``, ``swap``, ``over``, ``pick``,
:class:`defaultdict` objects support the following method in addition to the :class:`defaultdict` objects support the following method in addition to the
standard :class:`dict` operations: standard :class:`dict` operations:
.. method:: __missing__(key)
.. method:: defaultdict.__missing__(key)
If the :attr:`default_factory` attribute is ``None``, this raises a If the :attr:`default_factory` attribute is ``None``, this raises a
:exc:`KeyError` exception with the *key* as argument. :exc:`KeyError` exception with the *key* as argument.
@ -474,7 +473,7 @@ stack manipulations such as ``dup``, ``drop``, ``swap``, ``over``, ``pick``,
:class:`defaultdict` objects support the following instance variable: :class:`defaultdict` objects support the following instance variable:
.. attribute:: defaultdict.default_factory .. attribute:: default_factory
This attribute is used by the :meth:`__missing__` method; it is This attribute is used by the :meth:`__missing__` method; it is
initialized from the first argument to the constructor, if present, or to initialized from the first argument to the constructor, if present, or to
@ -858,7 +857,7 @@ original insertion position is changed and moved to the end::
del self[key] del self[key]
OrderedDict.__setitem__(self, key, value) OrderedDict.__setitem__(self, key, value)
An ordered dictionary can combined with the :class:`Counter` class An ordered dictionary can be combined with the :class:`Counter` class
so that the counter remembers the order elements are first encountered:: so that the counter remembers the order elements are first encountered::
class OrderedCounter(Counter, OrderedDict): class OrderedCounter(Counter, OrderedDict):