Commit a61c8e03 authored by Tim Peters's avatar Tim Peters

Indent body of _EXAMPLE_RE for readability. _IS_BLANK_OR_COMMENT makes

more sense as a callable.
parent 5c91d75e
......@@ -601,7 +601,7 @@ class Parser:
.*$\n? # But any other line
)*)
''', re.MULTILINE | re.VERBOSE)
_IS_BLANK_OR_COMMENT = re.compile('^[ ]*(#.*)?$')
_IS_BLANK_OR_COMMENT = re.compile('^[ ]*(#.*)?$').match
def get_examples(self):
"""
......@@ -638,7 +638,7 @@ class Parser:
# Extract source/want from the regexp match.
(source, want) = self._parse_example(m, lineno)
if self._IS_BLANK_OR_COMMENT.match(source):
if self._IS_BLANK_OR_COMMENT(source):
continue
examples.append( Example(source, want, lineno) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment