Label classes and exceptions explicitly in the documentation (for their
authorFred Drake <fdrake@acm.org>
Fri, 2 Mar 2001 18:57:05 +0000 (18:57 +0000)
committerFred Drake <fdrake@acm.org>
Fri, 2 Mar 2001 18:57:05 +0000 (18:57 +0000)
*desc environments).

Doc/perl/python.perl
Doc/texinputs/python.sty

index 289bb05845b76b0a405dc2e72e20d081df5e844e..890066ffc7caebf488c3d76b380508a11b0358df 100644 (file)
@@ -882,7 +882,7 @@ sub do_env_excdesc{
     local($_) = @_;
     my $excname = next_argument();
     my $idx = make_str_index_entry("<tt class='exception'>$excname</tt>");
-    return "<dl><dt><b>$idx</b>\n<dd>" . $_ . '</dl>'
+    return "<dl><dt><b>exception $idx</b>\n<dd>" . $_ . '</dl>'
 }
 
 sub do_env_fulllineitems{ return do_env_itemize(@_); }
@@ -895,7 +895,9 @@ sub handle_classlike_descriptor{
     $idx = make_str_index_entry(
                "<tt class='$what'>$THIS_CLASS</tt> ($what in $THIS_MODULE)" );
     $idx =~ s/ \(.*\)//;
-    return "<dl><dt><b>$idx</b> (<var>$arg_list</var>)\n<dd>" . $_ . '</dl>';
+    return ("<dl><dt><b>$what $idx</b> (<var>$arg_list</var>)\n<dd>"
+            . $_
+            . '</dl>');
 }
 
 sub do_env_classdesc{
index 9aa6700e22d9a36147692eef68816426567c315b..216f0b0b95d20a4859ce783166087aabb5213514 100644 (file)
 \sloppy
 \parindent = 0mm
 \parskip = 2mm
-\hbadness = 5000               % don't print trivial gripes
+\hbadness = 5000                % don't print trivial gripes
 
-\pagestyle{empty}              % start this way; change for
-\pagenumbering{roman}          % ToC & chapters
+\pagestyle{empty}               % start this way; change for
+\pagenumbering{roman}           % ToC & chapters
 
 % Use this to set the font family for headers and other decor:
 \newcommand{\py@HeaderFamily}{\sffamily}
   % Using \renewcommand doesn't work for this, for unknown reasons:
   \global\def\py@thisclass{#1}
   \begin{fulllineitems}
-    \item[\code{\bfcode{#1}(\py@varvars{#2})}%
+    \item[\strong{class }\code{\bfcode{#1}(\py@varvars{#2})}%
       \index{#1@{\py@idxcode{#1}} (class in \py@thismodule)}]
 }{\end{fulllineitems}}
 
   % Using \renewcommand doesn't work for this, for unknown reasons:
   \global\def\py@thisclass{#1}
   \begin{fulllineitems}
-    \item[\code{\bfcode{#1}(\py@varvars{#2})}%
+    \item[\strong{exception }\code{\bfcode{#1}(\py@varvars{#2})}%
       \index{#1@{\py@idxcode{#1}} (exception in \py@thismodule)}]
 }{\end{fulllineitems}}
 
 %  -- for constructor information, use excclassdesc instead
 \newenvironment{excdesc}[1]{
   \begin{fulllineitems}
-    \item[\bfcode{#1}%
+    \item[\strong{exception }\bfcode{#1}%
           \index{#1@{\py@idxcode{#1}} (exception in \py@thismodule)}]
 }{\end{fulllineitems}}
 
 }{
   \newcommand{\py@url}[1]{{%
     \pdfannotlink attr{/Border [0 0 0]} user{/S /URI /URI (#1)}%
-    \py@LinkColor%                             color of the link text
+    \py@LinkColor%                              color of the link text
     \mbox{\small\textsf{#1}}%
-    \py@NormalColor%                   Turn it back off; these are declarative
-    \pdfendlink}%                      and don't appear bound to the current
-  }%                                   formatting "box".
+    \py@NormalColor%                    Turn it back off; these are declarative
+    \pdfendlink}%                       and don't appear bound to the current
+  }%                                    formatting "box".
 }
 \let\url=\py@url
 \newcommand{\email}[1]{{\small\textsf{#1}}}
 \newcommand{\member}[1]{\texttt{#1}}
 \newcommand{\method}[1]{\texttt{#1}}
 
-\newcommand{\pytype}[1]{#1}            % built-in Python type
+\newcommand{\pytype}[1]{#1}             % built-in Python type
 
 \newcommand{\cfunction}[1]{\texttt{#1}}
-\newcommand{\ctype}[1]{\texttt{#1}}    % C struct or typedef name
-\newcommand{\cdata}[1]{\texttt{#1}}    % C variable, typically global
+\newcommand{\ctype}[1]{\texttt{#1}}     % C struct or typedef name
+\newcommand{\cdata}[1]{\texttt{#1}}     % C variable, typically global
 
 \newcommand{\mimetype}[1]{{\small\textsf{#1}}}
 % The \! is a "negative thin space" in math mode.
   \index{#1@{#1}}%
   \index{environment variables!{#1}}%
 }
-\newcommand{\makevar}[1]{#1}           % variable in a Makefile
+\newcommand{\makevar}[1]{#1}            % variable in a Makefile
 \newcommand{\character}[1]{\samp{#1}}
 
 % constants defined in Python modules or C headers, not language constants:
-\newcommand{\constant}[1]{\code{#1}}   % manifest constant, not syntactic
+\newcommand{\constant}[1]{\code{#1}}    % manifest constant, not syntactic
 
 \newcommand{\manpage}[2]{{\emph{#1}(#2)}}
 \newcommand{\pep}[1]{PEP #1\index{Python Enhancement Proposals!PEP #1}}