summaryrefslogtreecommitdiff
path: root/Doc/library/difflib.rst
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-11-12 16:57:03 +0200
committerGitHub <noreply@github.com>2019-11-12 16:57:03 +0200
commit138ccbb02216ca086047c3139857fb44f3dab1f9 (patch)
tree650ba3584d4d173fe36d757063909a09f239ebf2 /Doc/library/difflib.rst
parent9a13a388f202268dd7b771638adbec132449b98b (diff)
downloadcpython-git-138ccbb02216ca086047c3139857fb44f3dab1f9.tar.gz
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>".
Diffstat (limited to 'Doc/library/difflib.rst')
-rw-r--r--Doc/library/difflib.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst
index c2a19dc019..ada311bc3a 100644
--- a/Doc/library/difflib.rst
+++ b/Doc/library/difflib.rst
@@ -338,14 +338,14 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
.. function:: IS_LINE_JUNK(line)
- Return true for ignorable lines. The line *line* is ignorable if *line* is
+ Return ``True`` for ignorable lines. The line *line* is ignorable if *line* is
blank or contains a single ``'#'``, otherwise it is not ignorable. Used as a
default for parameter *linejunk* in :func:`ndiff` in older versions.
.. function:: IS_CHARACTER_JUNK(ch)
- Return true for ignorable characters. The character *ch* is ignorable if *ch*
+ Return ``True`` for ignorable characters. The character *ch* is ignorable if *ch*
is a space or tab, otherwise it is not ignorable. Used as a default for
parameter *charjunk* in :func:`ndiff`.
@@ -370,7 +370,7 @@ The :class:`SequenceMatcher` class has this constructor:
Optional argument *isjunk* must be ``None`` (the default) or a one-argument
function that takes a sequence element and returns true if and only if the
element is "junk" and should be ignored. Passing ``None`` for *isjunk* is
- equivalent to passing ``lambda x: 0``; in other words, no elements are ignored.
+ equivalent to passing ``lambda x: False``; in other words, no elements are ignored.
For example, pass::
lambda x: x in " \t"