# remaining is that perhaps it was really the case that " volatile"
# was inserted after "private". I can live with that <wink>.
-import re
-
-def IS_LINE_JUNK(line, pat=re.compile(r"\s*(?:#\s*)?$").match):
+def IS_LINE_JUNK(line, pat=None):
r"""
- Return True for ignorable line: iff `line` is blank or contains a single '#'.
+ Return True for ignorable line: if `line` is blank or contains a single '#'.
Examples:
False
"""
+ if pat is None:
+ # Default: match '#' or the empty string
+ return line.strip() in '#'
+ # Previous versions used the undocumented parameter 'pat' as a
+ # match function. Retain this behaviour for compatibility.
return pat(line) is not None
def IS_CHARACTER_JUNK(ch, ws=" \t"):
replace('\1','</span>'). \
replace('\t',' ')
-del re
def restore(delta, which):
r"""