bpo-38738: Fix formatting of True and False. (GH-17083)
* "Return true/false" is replaced with "Return ``True``/``False``"
if the function actually returns a bool.
* Fixed formatting of some True and False literals (now in monospace).
* Replaced "True/False" with "true/false" if it can be not only bool.
* Replaced some 1/0 with True/False if it corresponds the code.
* "Returns <bool>" is replaced with "Return <bool>".
diff --git a/Doc/library/optparse.rst b/Doc/library/optparse.rst
index 16f1cf0..c1a18e0 100644
--- a/Doc/library/optparse.rst
+++ b/Doc/library/optparse.rst
@@ -928,10 +928,10 @@
store a constant value
``"store_true"``
- store a true value
+ store ``True``
``"store_false"``
- store a false value
+ store ``False``
``"append"``
append this option's argument to a list
@@ -1135,12 +1135,12 @@
* ``"store_true"`` [relevant: :attr:`~Option.dest`]
- A special case of ``"store_const"`` that stores a true value to
+ A special case of ``"store_const"`` that stores ``True`` to
:attr:`~Option.dest`.
* ``"store_false"`` [relevant: :attr:`~Option.dest`]
- Like ``"store_true"``, but stores a false value.
+ Like ``"store_true"``, but stores ``False``.
Example::
@@ -1396,7 +1396,7 @@
.. method:: OptionParser.has_option(opt_str)
- Return true if the OptionParser has an option with option string *opt_str*
+ Return ``True`` if the OptionParser has an option with option string *opt_str*
(e.g., ``-q`` or ``--verbose``).
.. method:: OptionParser.remove_option(opt_str)