summaryrefslogtreecommitdiffstats
path: root/Doc/library/optparse.rst
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-11-12 16:54:10 (GMT)
committerGitHub <noreply@github.com>2019-11-12 16:54:10 (GMT)
commitd360346640e19231032b072216195484fa2450b4 (patch)
tree3944c610d7a2b3cbe6a08fbd69ebdace8659a8a1 /Doc/library/optparse.rst
parent29fd6a77d509cffacc5691ebd9dab53455ad959e (diff)
downloadcpython-d360346640e19231032b072216195484fa2450b4.zip
cpython-d360346640e19231032b072216195484fa2450b4.tar.gz
cpython-d360346640e19231032b072216195484fa2450b4.tar.bz2
[3.8] bpo-38738: Fix formatting of True and False. (GH-17083) (GH-17125)
* "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>". (cherry picked from commit 138ccbb02216ca086047c3139857fb44f3dab1f9)
Diffstat (limited to 'Doc/library/optparse.rst')
-rw-r--r--Doc/library/optparse.rst10
1 files changed, 5 insertions, 5 deletions
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 @@ The canonical way to create an :class:`Option` instance is with the
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 @@ must specify for any option using that action.
* ``"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 @@ provides several methods to help you out:
.. 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)