[Python-checkins] python/dist/src/Doc/lib libdoctest.tex,1.54,1.55

tim_one at users.sourceforge.net tim_one at users.sourceforge.net
Sun Sep 26 04:38:43 CEST 2004


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3828/Doc/lib

Modified Files:
	libdoctest.tex 
Log Message:
register_optionflag():  Moved from the Debugging section to the section
on option flags; added a versionadded decoration.


Index: libdoctest.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdoctest.tex,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- libdoctest.tex	26 Sep 2004 02:12:40 -0000	1.54
+++ libdoctest.tex	26 Sep 2004 02:38:41 -0000	1.55
@@ -710,6 +710,25 @@
     matches an empty line in actual output; and doctest directives
     were added]{2.4}
 
+There's also a way to register new option flag names, although this
+isn't useful unless you intend to extend \module{doctest} internals
+via subclassing:
+
+\begin{funcdesc}{register_optionflag}{name}
+  Create a new option flag with a given name, and return the new
+  flag's integer value.  \function{register_optionflag()} can be
+  used when subclassing \class{OutputChecker} or
+  \class{DocTestRunner} to create new options that are supported by
+  your subclasses.  \function{register_optionflag} should always be
+  called using the following idiom:
+
+\begin{verbatim}
+  MY_FLAG = register_optionflag('MY_FLAG')
+\end{verbatim}
+
+  \versionadded{2.4}
+\end{funcdesc}
+
 \subsubsection{Warnings\label{doctest-warnings}}
 
 \module{doctest} is serious about requiring exact matches in expected
@@ -1620,18 +1639,6 @@
     returned by \function{sys.exc_info()}.
 \end{memberdesc}
 
-\begin{funcdesc}{register_optionflag}{name}
-    Create a new option flag with a given name, and return the new
-    flag's integer value.  \function{register_optionflag()} can be
-    used when subclassing \class{OutputChecker} or
-    \class{DocTestRunner} to create new options that are supported by
-    your subclasses.  \function{register_optionflag} should always be
-    called using the following idiom:
-\begin{verbatim}
-  MY_FLAG = register_optionflag('MY_FLAG')
-\end{verbatim}
-\end{funcdesc}
-
 \subsection{Soapbox\label{doctest-soapbox}}
 
 As mentioned in the introduction, \module{doctest} has grown to have



More information about the Python-checkins mailing list