Skip to content
3 changes: 1 addition & 2 deletions Lib/difflib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1053,8 +1053,7 @@ def IS_LINE_JUNK(line, pat=None):
"""

if pat is None:
stripped = line.strip()
return stripped == '' or stripped == '#'
return line.strip() in ('', '#')
return pat(line) is not None

def IS_CHARACTER_JUNK(ch, ws=" \t"):
Expand Down
Loading