Mercurial > cpython-lru_cache-weakref
comparison Doc/texinputs/python.sty @ 9524:c6a1103efa8a legacy-trunk
Minor nit that fixes a bunch of indexing: the way the classdesc
environment saves the name of the last class described, method and
member descriptions were not picking it up correctly. Thus, many
index entries were described as "( method)" instead of "(FooClass
method)". Multiple entries were collapsed in the index when
methods/members from multiple classes share the same name.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Wed, 25 Nov 1998 17:13:28 +0000 |
| parents | 18f81faf4bd9 |
| children | 1437c2335b3b |
comparison
equal
deleted
inserted
replaced
| 9523:ed6cacddc6c6 | 9524:c6a1103efa8a |
|---|---|
| 500 }{\end{fulllineitems}} | 500 }{\end{fulllineitems}} |
| 501 | 501 |
| 502 % classes ---------------------------------------------------------------- | 502 % classes ---------------------------------------------------------------- |
| 503 % \begin{classdesc}{name}{constructor args} | 503 % \begin{classdesc}{name}{constructor args} |
| 504 \newenvironment{classdesc}[2]{ | 504 \newenvironment{classdesc}[2]{ |
| 505 \renewcommand{\py@thisclass}{#1} | 505 % Using \renewcommand doesn't work for this, for unknown reasons: |
| 506 \global\def\py@thisclass{#1} | |
| 506 \begin{fulllineitems} | 507 \begin{fulllineitems} |
| 507 \item[\code{\bfcode{#1}(\py@varvars{#2})}% | 508 \item[\code{\bfcode{#1}(\py@varvars{#2})}% |
| 508 \withsubitem{(class in \py@thismodule)}{\ttindex{#1}}] | 509 \withsubitem{(class in \py@thismodule)}{\ttindex{#1}}] |
| 509 }{\end{fulllineitems}} | 510 }{\end{fulllineitems}} |
| 510 | 511 |
