Mercurial > cpython-lru_cache-weakref
comparison Doc/texinputs/python.sty @ 10855:28887f40e344 legacy-trunk
\declaremodule: Make this more robust. Only attempt to add an index
entry based on the module type if the type is known.
Otherwise, spit out a warning the the module type
parameter was bad and generate a "plain" index entry.
Without this, the bad module type was emitted as
text.
Problem noticed by processing Michael Hudson's docs for
bytecodehacks.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Mon, 17 May 1999 14:47:10 +0000 |
| parents | b7378df3db56 |
| children | be0ac5abe83b |
comparison
equal
deleted
inserted
replaced
| 10854:f2e123af2ada | 10855:28887f40e344 |
|---|---|
| 312 \ifx\py@modulebadkey#1 | 312 \ifx\py@modulebadkey#1 |
| 313 \renewcommand{\py@thismodulekey}{#3} | 313 \renewcommand{\py@thismodulekey}{#3} |
| 314 \else | 314 \else |
| 315 \renewcommand{\py@thismodulekey}{#1} | 315 \renewcommand{\py@thismodulekey}{#1} |
| 316 \fi | 316 \fi |
| 317 \csname py@#2IndexModule\endcsname{#3} | 317 \@ifundefined{py@#2IndexModule}{% |
| 318 \typeout{*** MACRO declaremodule called with unknown module type: `#2'} | |
| 319 \py@ModuleIndex{#3}% | |
| 320 }{% | |
| 321 \csname py@#2IndexModule\endcsname{#3}% | |
| 322 } | |
| 318 \label{module-\py@thismodulekey} | 323 \label{module-\py@thismodulekey} |
| 319 } | 324 } |
| 320 \newif\ifpy@ModPlatformFileIsOpen \py@ModPlatformFileIsOpenfalse | 325 \newif\ifpy@ModPlatformFileIsOpen \py@ModPlatformFileIsOpenfalse |
| 321 \newcommand{\py@ModPlatformFilename}{\jobname.pla} | 326 \newcommand{\py@ModPlatformFilename}{\jobname.pla} |
| 322 \newcommand{\platform}[1]{ | 327 \newcommand{\platform}[1]{ |
