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
003584ce
Commit
003584ce
authored
Jun 11, 2001
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix recent changes so that this section will format again.
parent
edaa330a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
Doc/lib/libdoctest.tex
Doc/lib/libdoctest.tex
+3
-2
No files found.
Doc/lib/libdoctest.tex
View file @
003584ce
...
@@ -406,18 +406,19 @@ often contrive doctest examples to produce numbers of that form:
...
@@ -406,18 +406,19 @@ often contrive doctest examples to produce numbers of that form:
Simple fractions are also easier for people to understand, and that makes
Simple fractions are also easier for people to understand, and that makes
for better documentation.
for better documentation.
\end{enumerate}
\item
Be careful if you have code that must only execute once.
\item
Be careful if you have code that must only execute once.
If you have module-level code that must only execute once, a more foolproof
If you have module-level code that must only execute once, a more foolproof
definition of
\function
{_
test
}
is
definition of
\function
{_
test
()
}
is
\begin{verbatim}
\begin{verbatim}
def
_
test():
def
_
test():
import doctest, sys
import doctest, sys
doctest.testmod(sys.modules["
__
main
__
"])
doctest.testmod(sys.modules["
__
main
__
"])
\end{verbatim}
\end{verbatim}
\end{enumerate}
\subsection
{
Soapbox
}
\subsection
{
Soapbox
}
...
...
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