[Python-checkins] bpo-43689: improve documentation for Differ (GH-25132)

miss-islington webhook-mailer at python.org
Tue May 10 16:57:36 EDT 2022


https://github.com/python/cpython/commit/fe1c5ba60878482b34b60de36424390a2dcdae50
commit: fe1c5ba60878482b34b60de36424390a2dcdae50
branch: main
author: Jürgen Gmach <juergen.gmach at googlemail.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-05-10T13:57:12-07:00
summary:

bpo-43689: improve documentation for Differ (GH-25132)



Lines beginning with ``?`` try to help understanding the given diff.

The output can be hard to understand when it contains whitespace characters, such as spaces, tabs or line breaks.

While previously only tabs were mentioned, now all are listed.

Automerge-Triggered-By: GH:rhettinger

files:
A Misc/NEWS.d/next/Documentation/2021-04-01-08-09-34.bpo-43689.mqCfLe.rst
M Doc/library/difflib.rst

diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst
index aa08988c8b36f..10f8808d33b16 100644
--- a/Doc/library/difflib.rst
+++ b/Doc/library/difflib.rst
@@ -79,7 +79,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
 
    Lines beginning with '``?``' attempt to guide the eye to intraline differences,
    and were not present in either input sequence. These lines can be confusing if
-   the sequences contain tab characters.
+   the sequences contain whitespace characters, such as spaces, tabs or line breaks.
 
 
 .. class:: HtmlDiff
diff --git a/Misc/NEWS.d/next/Documentation/2021-04-01-08-09-34.bpo-43689.mqCfLe.rst b/Misc/NEWS.d/next/Documentation/2021-04-01-08-09-34.bpo-43689.mqCfLe.rst
new file mode 100644
index 0000000000000..5cc13d7068c95
--- /dev/null
+++ b/Misc/NEWS.d/next/Documentation/2021-04-01-08-09-34.bpo-43689.mqCfLe.rst
@@ -0,0 +1 @@
+The ``Differ`` documentation now also mentions other whitespace characters, which make it harder to understand the diff output.



More information about the Python-checkins mailing list