Skip to content

Commit 0ab8da8

Browse files
committed
Add backward compatibility
1 parent 352b4bc commit 0ab8da8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/difflib.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,9 @@ def IS_LINE_JUNK(line, pat=None):
10521052
False
10531053
"""
10541054

1055-
return line.strip() in ('', '#')
1055+
return (line.strip() in ('', '#')
1056+
if pat is None
1057+
else pat(line) is not None)
10561058

10571059
def IS_CHARACTER_JUNK(ch, ws=" \t"):
10581060
r"""

0 commit comments

Comments
 (0)