summaryrefslogtreecommitdiffstats
path: root/Doc/texinputs
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2002-04-15 20:48:40 (GMT)
committerFred Drake <fdrake@acm.org>2002-04-15 20:48:40 (GMT)
commit34adb8a8ec035afef6bbef0607ad48ed0973f838 (patch)
treeedf273940d28df33cbcc2086f00b31b824dd5077 /Doc/texinputs
parent1251b0eb242d313d778538ce55888c11bfa8b678 (diff)
downloadcpython-34adb8a8ec035afef6bbef0607ad48ed0973f838.zip
cpython-34adb8a8ec035afef6bbef0607ad48ed0973f838.tar.gz
cpython-34adb8a8ec035afef6bbef0607ad48ed0973f838.tar.bz2
Separate out a \cfuncline macro from the cfuncdesc environment.
This matches many other of the *desc environments, and is useful when multiple functions share a description.
Diffstat (limited to 'Doc/texinputs')
-rw-r--r--Doc/texinputs/python.sty5
1 files changed, 4 insertions, 1 deletions
diff --git a/Doc/texinputs/python.sty b/Doc/texinputs/python.sty
index 5807416..5756213 100644
--- a/Doc/texinputs/python.sty
+++ b/Doc/texinputs/python.sty
@@ -585,9 +585,12 @@
% \begin{cfuncdesc}[refcount]{type}{name}{arglist}
% Note that the [refcount] slot should only be filled in by
% tools/anno-api.py; it pulls the value from the refcounts database.
+\newcommand{\cfuncline}[3]{
+ \item[\code{#1 \bfcode{#2}(\py@varvars{#3})}\index{#2@{\py@idxcode{#2()}}}]
+}
\newenvironment{cfuncdesc}[4][\py@badkey]{
\begin{fulllineitems}
- \item[\code{#2 \bfcode{#3}(\py@varvars{#4})}\index{#3@{\py@idxcode{#3()}}}]
+ \cfuncline{#2}{#3}{#4}
\ifx#1\@undefined\else%
\emph{Return value: \textbf{#1}.}\\
\fi