diff options
author | Fred Drake <fdrake@acm.org> | 2001-05-11 01:00:30 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-05-11 01:00:30 (GMT) |
commit | 06a01e84b90129d3edb8e9620972733a88bae4fb (patch) | |
tree | 31a1076b21a380dd25698119e484b91b7e89ac61 /Doc/texinputs | |
parent | 986badae1ea6f1545ceae53147f5c2ab7750915b (diff) | |
download | cpython-06a01e84b90129d3edb8e9620972733a88bae4fb.zip cpython-06a01e84b90129d3edb8e9620972733a88bae4fb.tar.gz cpython-06a01e84b90129d3edb8e9620972733a88bae4fb.tar.bz2 |
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.
Diffstat (limited to 'Doc/texinputs')
-rw-r--r-- | Doc/texinputs/python.sty | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/texinputs/python.sty b/Doc/texinputs/python.sty index 795882d..35f7727 100644 --- a/Doc/texinputs/python.sty +++ b/Doc/texinputs/python.sty @@ -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 |