diff Doc/texinputs/python.sty @ 17778:b4b3657cb1fa legacy-trunk

Define a new environment, classdesc*, which can be used to document a class without providing any information about the constructor. This should be used for classes which only exist to act as containers rather than as factories for instances.
author Fred Drake <fdrake@acm.org>
date Fri, 11 May 2001 01:00:30 +0000
parents db928a277f8b
children c25876a51f1b
line wrap: on
line diff
--- a/Doc/texinputs/python.sty	Thu May 10 22:37:38 2001 +0000
+++ b/Doc/texinputs/python.sty	Fri May 11 01:00:30 2001 +0000
@@ -623,6 +623,15 @@
       \index{#1@{\py@idxcode{#1}} (class in \py@thismodule)}]
 }{\end{fulllineitems}}
 
+% \begin{classdesc*}{name}
+\newenvironment{classdesc*}[1]{
+  % Using \renewcommand doesn't work for this, for unknown reasons:
+  \global\def\py@thisclass{#1}
+  \begin{fulllineitems}
+    \item[\strong{class }\code{\bfcode{#1}}%
+      \index{#1@{\py@idxcode{#1}} (class in \py@thismodule)}]
+}{\end{fulllineitems}}
+
 % \begin{excclassdesc}{name}{constructor args}
 % but indexes as an exception
 \newenvironment{excclassdesc}[2]{
@@ -633,6 +642,9 @@
       \index{#1@{\py@idxcode{#1}} (exception in \py@thismodule)}]
 }{\end{fulllineitems}}
 
+% There is no corresponding {excclassdesc*} environment.  To describe
+% a class exception without parameters, use the {excdesc} environment.
+
 
 \let\py@classbadkey=\@undefined