Mercurial > cpython-lru_cache-weakref
diff Doc/texinputs/python.sty @ 18214:b664b02c3e91 2.1
Add support for the classdesc* environment and the \releaseinfo and
\setreleaseinfo macros added to the CVS head.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Fri, 22 Jun 2001 15:51:28 +0000 |
| parents | 2fcb3fa67e3b |
| children | d0413de143ec |
line wrap: on
line diff
--- a/Doc/texinputs/python.sty Fri Jun 22 15:41:58 2001 +0000 +++ b/Doc/texinputs/python.sty Fri Jun 22 15:51:28 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 @@ -1036,12 +1048,15 @@ \newcommand{\py@release}{} \newcommand{\version}{} \newcommand{\shortversion}{} +\newcommand{\releaseinfo}{} \newcommand{\releasename}{Release} \newcommand{\release}[1]{% \renewcommand{\py@release}{\releasename\space\version}% \renewcommand{\version}{#1}} \newcommand{\setshortversion}[1]{% \renewcommand{\shortversion}{#1}} +\newcommand{\setreleaseinfo}[1]{% + \renewcommand{\releaseinfo}{#1}} % Allow specification of the author's address separately from the % author's name. This can be used to format them differently, which
