Commit 003584ce authored by Fred Drake's avatar Fred Drake

Fix recent changes so that this section will format again.

parent edaa330a
...@@ -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}
......
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