Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a61c8e03
Commit
a61c8e03
authored
Aug 09, 2004
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Indent body of _EXAMPLE_RE for readability. _IS_BLANK_OR_COMMENT makes
more sense as a callable.
parent
5c91d75e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
Lib/doctest.py
Lib/doctest.py
+13
-13
No files found.
Lib/doctest.py
View file @
a61c8e03
...
...
@@ -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
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment