diff Doc/texinputs/python.sty @ 23063:530aba3116a4 legacy-trunk

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.
author Fred Drake <fdrake@acm.org>
date Mon, 15 Apr 2002 20:48:40 +0000
parents d6322983069e
children bc00eeef0ac7
line wrap: on
line diff
--- a/Doc/texinputs/python.sty	Mon Apr 15 20:10:23 2002 +0000
+++ b/Doc/texinputs/python.sty	Mon Apr 15 20:48:40 2002 +0000
@@ -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