Fix recent changes so that this section will format again.

This commit is contained in:
Fred Drake 2001-06-11 14:55:01 +00:00
parent c533edceb1
commit c115835457
1 changed files with 3 additions and 2 deletions

View File

@ -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
for better documentation.
\end{enumerate}
\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
definition of \function{_test} is
definition of \function{_test()} is
\begin{verbatim}
def _test():
import doctest, sys
doctest.testmod(sys.modules["__main__"])
\end{verbatim}
\end{enumerate}
\subsection{Soapbox}