Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9d987b4

Browse filesBrowse files
authored
Revert, but add explanatory comments
1 parent 60951fb commit 9d987b4
Copy full SHA for 9d987b4

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed

‎Lib/difflib.py

Copy file name to clipboardExpand all lines: Lib/difflib.py
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,10 @@ def IS_LINE_JUNK(line, pat=None):
10531053
"""
10541054

10551055
if pat is None:
1056-
return line.strip() in {'', '#'}
1056+
# Default: match '#' or the empty string
1057+
return line.strip() in '#'
1058+
# Previous versions used the undocumented parameter 'pat' as a
1059+
# match function. Retain this behaviour for compatibility.
10571060
return pat(line) is not None
10581061

10591062
def IS_CHARACTER_JUNK(ch, ws=" \t"):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.