summaryrefslogtreecommitdiffstats
path: root/Doc/texinputs
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-09-09 06:01:25 (GMT)
committerFred Drake <fdrake@acm.org>2000-09-09 06:01:25 (GMT)
commit4e607964d1fa55a49dad145c3bc5baf56fa8a179 (patch)
tree3a09111f6dc79f75d07f998fbc0bd27bba5dc9d9 /Doc/texinputs
parent75c6cb909c5832c36875015a5f9edb28d1977f32 (diff)
downloadcpython-4e607964d1fa55a49dad145c3bc5baf56fa8a179.zip
cpython-4e607964d1fa55a49dad145c3bc5baf56fa8a179.tar.gz
cpython-4e607964d1fa55a49dad145c3bc5baf56fa8a179.tar.bz2
excclassdesc: New environment. For use in documenting class-based
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.
Diffstat (limited to 'Doc/texinputs')
-rw-r--r--Doc/texinputs/python.sty19
1 files changed, 19 insertions, 0 deletions
diff --git a/Doc/texinputs/python.sty b/Doc/texinputs/python.sty
index 9d0db97..40c870b 100644
--- a/Doc/texinputs/python.sty
+++ b/Doc/texinputs/python.sty
@@ -601,6 +601,16 @@
\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
@@ -803,6 +813,7 @@
\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}}
@@ -911,6 +922,14 @@
\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%