Make the doctests in the docs pass, except for those in the turtle module.
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index a568d44..eaab33e 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -184,7 +184,7 @@
class is similar to bags or multisets in other languages.
Elements are counted from an *iterable* or initialized from another
- *mapping* (or counter)::
+ *mapping* (or counter):
>>> c = Counter() # a new, empty counter
>>> c = Counter('gallahad') # a new counter from an iterable
@@ -192,7 +192,7 @@
>>> c = Counter(cats=4, dogs=8) # a new counter from keyword args
Counter objects have a dictionary interface except that they return a zero
- count for missing items instead of raising a :exc:`KeyError`::
+ count for missing items instead of raising a :exc:`KeyError`:
>>> c = Counter(['eggs', 'ham'])
>>> c['bacon'] # count of a missing element is zero
@@ -225,7 +225,7 @@
Return a list of the *n* most common elements and their counts from the
most common to the least. If *n* is not specified, :func:`most_common`
returns *all* elements in the counter. Elements with equal counts are
- ordered arbitrarily::
+ ordered arbitrarily:
>>> Counter('abracadabra').most_common(3)
[('a', 5), ('r', 2), ('b', 2)]
diff --git a/Doc/library/decimal.rst b/Doc/library/decimal.rst
index ebe0d8c..8d11315 100644
--- a/Doc/library/decimal.rst
+++ b/Doc/library/decimal.rst
@@ -1850,7 +1850,7 @@
>>> Decimal('3.214').quantize(TWOPLACES, context=Context(traps=[Inexact]))
Traceback (most recent call last):
...
- Inexact
+ Inexact: None
Q. Once I have valid two place inputs, how do I maintain that invariant
throughout an application?
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index c95566b..4c4f4ae 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -181,13 +181,13 @@
:attr:`returncode`
attribute and output in the :attr:`output` attribute.
- The arguments are the same as for the :class:`Popen` constructor. Example:
+ The arguments are the same as for the :class:`Popen` constructor. Example::
>>> subprocess.check_output(["ls", "-l", "/dev/null"])
'crw-rw-rw- 1 root root 1, 3 Oct 18 2007 /dev/null\n'
The stdout argument is not allowed as it is used internally.
- To capture standard error in the result, use stderr=subprocess.STDOUT.
+ To capture standard error in the result, use ``stderr=subprocess.STDOUT``::
>>> subprocess.check_output(
["/bin/sh", "-c", "ls non_existent_file ; exit 0"],