Skip to content

Commit 64dff4a

Browse files
committed
Update difflib.py
1 parent 0ab8da8 commit 64dff4a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Lib/difflib.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,7 @@ def _qformat(self, aline, bline, atags, btags):
10401040

10411041
def IS_LINE_JUNK(line, pat=None):
10421042
r"""
1043-
Return True for ignorable line: iff `line` is blank or contains a single '#'.
1043+
Return True for ignorable line: if `line` is blank or contains a single '#'.
10441044
10451045
Examples:
10461046
@@ -1052,9 +1052,9 @@ def IS_LINE_JUNK(line, pat=None):
10521052
False
10531053
"""
10541054

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

10591059
def IS_CHARACTER_JUNK(ch, ws=" \t"):
10601060
r"""

0 commit comments

Comments
 (0)