summaryrefslogtreecommitdiff
path: root/Doc/library/optparse.rst
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-10-19 16:29:26 +0300
committerSerhiy Storchaka <storchaka@gmail.com>2016-10-19 16:29:26 +0300
commit683953d538a84e211ba1101b020f82e973027b7f (patch)
tree5be9047ccb79cb06bf887e4f7c3c3e8ac8a6a111 /Doc/library/optparse.rst
parent7630e3e5b31d605b003bdd8856edaaf2d8ae69db (diff)
downloadcpython-683953d538a84e211ba1101b020f82e973027b7f.tar.gz
Issue #19795: Mark up None as literal text.
Diffstat (limited to 'Doc/library/optparse.rst')
-rw-r--r--Doc/library/optparse.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/optparse.rst b/Doc/library/optparse.rst
index e5f40f492c..2ef187db2d 100644
--- a/Doc/library/optparse.rst
+++ b/Doc/library/optparse.rst
@@ -2026,12 +2026,12 @@ Features of note:
values.ensure_value(attr, value)
- If the ``attr`` attribute of ``values`` doesn't exist or is None, then
+ If the ``attr`` attribute of ``values`` doesn't exist or is ``None``, then
ensure_value() first sets it to ``value``, and then returns 'value. This is
very handy for actions like ``"extend"``, ``"append"``, and ``"count"``, all
of which accumulate data in a variable and expect that variable to be of a
certain type (a list for the first two, an integer for the latter). Using
:meth:`ensure_value` means that scripts using your action don't have to worry
about setting a default value for the option destinations in question; they
- can just leave the default as None and :meth:`ensure_value` will take care of
+ can just leave the default as ``None`` and :meth:`ensure_value` will take care of
getting it right when it's needed.