]> granicus.if.org Git - python/commitdiff
excclassdesc: New environment. For use in documenting class-based
authorFred Drake <fdrake@acm.org>
Sat, 9 Sep 2000 06:01:25 +0000 (06:01 +0000)
committerFred Drake <fdrake@acm.org>
Sat, 9 Sep 2000 06:01:25 +0000 (06:01 +0000)
        exceptions which have interesting constructor signatures.

\pep, \seepep:  New macros.  Equivalent to \rfc and \seerfc, but
        referring to the PEP series instead of the Internet RFC
        series of documents.

Doc/texinputs/python.sty

index 9d0db973dbd1d3285347764b603e6abc1f1b48eb..40c870bbf9e6101938270252d6a0c97d55da07a0 100644 (file)
       \withsubitem{(class in \py@thismodule)}{\ttindex{#1}}]
 }{\end{fulllineitems}}
 
+% \begin{excclassdesc}{name}{constructor args}
+% but indexes as an exception
+\newenvironment{excclassdesc}[2]{
+  % Using \renewcommand doesn't work for this, for unknown reasons:
+  \global\def\py@thisclass{#1}
+  \begin{fulllineitems}
+    \item[\code{\bfcode{#1}(\py@varvars{#2})}%
+      \withsubitem{(exception in \py@thismodule)}{\ttindex{#1}}]
+}{\end{fulllineitems}}
+
 
 \let\py@classbadkey=\@undefined
 
 \newcommand{\constant}[1]{\code{#1}}   % manifest constant, not syntactic
 
 \newcommand{\manpage}[2]{{\emph{#1}(#2)}}
+\newcommand{\pep}[1]{PEP #1\index{Python Enhancement Proposals!PEP #1}}
 \newcommand{\rfc}[1]{RFC #1\index{RFC!RFC #1}}
 \newcommand{\program}[1]{\strong{#1}}
 \newcommand{\programopt}[1]{\strong{#1}}
     \end{fulllineitems}
   }
 }
+% \seepep{number}{title}{why it's interesting}
+\newcommand{\py@seepep}[3]{%
+  \par%
+  \begin{fulllineitems}
+    \item[\pep{#1}, ``\emph{#2}'']
+    #3
+  \end{fulllineitems}
+}
 % \seerfc{number}{title}{why it's interesting}
 \newcommand{\py@seerfc}[3]{%
   \par%