From 346dd13ad45efecbe7d36d6636aca2634a3d7904 Mon Sep 17 00:00:00 2001 From: George Ogden Date: Sun, 5 Oct 2025 13:21:46 +0200 Subject: [PATCH 1/2] Update ambiguous difflib documentation --- Doc/library/difflib.rst | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst index c55ecac340972b..d979f08746f2ca 100644 --- a/Doc/library/difflib.rst +++ b/Doc/library/difflib.rst @@ -229,12 +229,13 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module. (or ``None``): *linejunk*: A function that accepts a single string argument, and returns - true if the string is junk, or false if not. The default is ``None``. There - is also a module-level function :func:`IS_LINE_JUNK`, which filters out lines - without visible characters, except for at most one pound character (``'#'``) - -- however the underlying :class:`SequenceMatcher` class does a dynamic - analysis of which lines are so frequent as to constitute noise, and this - usually works better than using this function. + true if the string is junk, or false if not. The default is ``None``. There + is also a module-level function :func:`IS_LINE_JUNK`, which filters out + lines without visible characters, or containing one occurrence of the + pound, or hash symbol (``'#'``) -- however the underlying + :class:`SequenceMatcher` class does a dynamic analysis of which lines are + so frequent as to constitute noise, and this usually works better than + using this function. *charjunk*: A function that accepts a character (a string of length 1), and returns if the character is junk, or false if not. The default is module-level From 13c253388b8ece2f3edc16117af109bf158b6fc6 Mon Sep 17 00:00:00 2001 From: George Ogden Date: Sun, 5 Oct 2025 17:13:48 +0200 Subject: [PATCH 2/2] Change 'pound symbol' to 'hash symbol' --- Doc/library/difflib.rst | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst index d979f08746f2ca..7a427078909211 100644 --- a/Doc/library/difflib.rst +++ b/Doc/library/difflib.rst @@ -229,13 +229,12 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module. (or ``None``): *linejunk*: A function that accepts a single string argument, and returns - true if the string is junk, or false if not. The default is ``None``. There - is also a module-level function :func:`IS_LINE_JUNK`, which filters out - lines without visible characters, or containing one occurrence of the - pound, or hash symbol (``'#'``) -- however the underlying - :class:`SequenceMatcher` class does a dynamic analysis of which lines are - so frequent as to constitute noise, and this usually works better than - using this function. + true if the string is junk, or false if not. The default is ``None``. There + is also a module-level function :func:`IS_LINE_JUNK`, which filters out lines + without visible characters, except for at most one hash character (``'#'``) + -- however the underlying :class:`SequenceMatcher` class does a dynamic + analysis of which lines are so frequent as to constitute noise, and this + usually works better than using this function. *charjunk*: A function that accepts a character (a string of length 1), and returns if the character is junk, or false if not. The default is module-level