Mercurial > cpython-lru_cache-weakref
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 18213:f9d127ab32ec | 18214:b664b02c3e91 |
|---|---|
| 621 \begin{fulllineitems} | 621 \begin{fulllineitems} |
| 622 \item[\strong{class }\code{\bfcode{#1}(\py@varvars{#2})}% | 622 \item[\strong{class }\code{\bfcode{#1}(\py@varvars{#2})}% |
| 623 \index{#1@{\py@idxcode{#1}} (class in \py@thismodule)}] | 623 \index{#1@{\py@idxcode{#1}} (class in \py@thismodule)}] |
| 624 }{\end{fulllineitems}} | 624 }{\end{fulllineitems}} |
| 625 | 625 |
| 626 % \begin{classdesc*}{name} | |
| 627 \newenvironment{classdesc*}[1]{ | |
| 628 % Using \renewcommand doesn't work for this, for unknown reasons: | |
| 629 \global\def\py@thisclass{#1} | |
| 630 \begin{fulllineitems} | |
| 631 \item[\strong{class }\code{\bfcode{#1}}% | |
| 632 \index{#1@{\py@idxcode{#1}} (class in \py@thismodule)}] | |
| 633 }{\end{fulllineitems}} | |
| 634 | |
| 626 % \begin{excclassdesc}{name}{constructor args} | 635 % \begin{excclassdesc}{name}{constructor args} |
| 627 % but indexes as an exception | 636 % but indexes as an exception |
| 628 \newenvironment{excclassdesc}[2]{ | 637 \newenvironment{excclassdesc}[2]{ |
| 629 % Using \renewcommand doesn't work for this, for unknown reasons: | 638 % Using \renewcommand doesn't work for this, for unknown reasons: |
| 630 \global\def\py@thisclass{#1} | 639 \global\def\py@thisclass{#1} |
| 631 \begin{fulllineitems} | 640 \begin{fulllineitems} |
| 632 \item[\strong{exception }\code{\bfcode{#1}(\py@varvars{#2})}% | 641 \item[\strong{exception }\code{\bfcode{#1}(\py@varvars{#2})}% |
| 633 \index{#1@{\py@idxcode{#1}} (exception in \py@thismodule)}] | 642 \index{#1@{\py@idxcode{#1}} (exception in \py@thismodule)}] |
| 634 }{\end{fulllineitems}} | 643 }{\end{fulllineitems}} |
| 644 | |
| 645 % There is no corresponding {excclassdesc*} environment. To describe | |
| 646 % a class exception without parameters, use the {excdesc} environment. | |
| 635 | 647 |
| 636 | 648 |
| 637 \let\py@classbadkey=\@undefined | 649 \let\py@classbadkey=\@undefined |
| 638 | 650 |
| 639 % object method ---------------------------------------------------------- | 651 % object method ---------------------------------------------------------- |
| 1034 % release to specify the Python release that is documented. | 1046 % release to specify the Python release that is documented. |
| 1035 % | 1047 % |
| 1036 \newcommand{\py@release}{} | 1048 \newcommand{\py@release}{} |
| 1037 \newcommand{\version}{} | 1049 \newcommand{\version}{} |
| 1038 \newcommand{\shortversion}{} | 1050 \newcommand{\shortversion}{} |
| 1051 \newcommand{\releaseinfo}{} | |
| 1039 \newcommand{\releasename}{Release} | 1052 \newcommand{\releasename}{Release} |
| 1040 \newcommand{\release}[1]{% | 1053 \newcommand{\release}[1]{% |
| 1041 \renewcommand{\py@release}{\releasename\space\version}% | 1054 \renewcommand{\py@release}{\releasename\space\version}% |
| 1042 \renewcommand{\version}{#1}} | 1055 \renewcommand{\version}{#1}} |
| 1043 \newcommand{\setshortversion}[1]{% | 1056 \newcommand{\setshortversion}[1]{% |
| 1044 \renewcommand{\shortversion}{#1}} | 1057 \renewcommand{\shortversion}{#1}} |
| 1058 \newcommand{\setreleaseinfo}[1]{% | |
| 1059 \renewcommand{\releaseinfo}{#1}} | |
| 1045 | 1060 |
| 1046 % Allow specification of the author's address separately from the | 1061 % Allow specification of the author's address separately from the |
| 1047 % author's name. This can be used to format them differently, which | 1062 % author's name. This can be used to format them differently, which |
| 1048 % is a good thing. | 1063 % is a good thing. |
| 1049 % | 1064 % |
