summaryrefslogtreecommitdiffstats
path: root/Doc/texinputs
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1998-04-02 22:33:16 (GMT)
committerFred Drake <fdrake@acm.org>1998-04-02 22:33:16 (GMT)
commit537149707bf77cf16a59e807b016ec9c96c952d9 (patch)
tree74b5539f20ccfc45b27fef1c5cca6fa344b5b82b /Doc/texinputs
parent1191692d3da4738fbe5bb76e85ce09a0a458b693 (diff)
downloadcpython-537149707bf77cf16a59e807b016ec9c96c952d9.zip
cpython-537149707bf77cf16a59e807b016ec9c96c952d9.tar.gz
cpython-537149707bf77cf16a59e807b016ec9c96c952d9.tar.bz2
Removed an obsolete hack that's been commented out for a long time.
Added comments to various sections.
Diffstat (limited to 'Doc/texinputs')
-rw-r--r--Doc/texinputs/python.sty20
1 files changed, 10 insertions, 10 deletions
diff --git a/Doc/texinputs/python.sty b/Doc/texinputs/python.sty
index ad3e4a7..009caaf 100644
--- a/Doc/texinputs/python.sty
+++ b/Doc/texinputs/python.sty
@@ -228,16 +228,6 @@
}
\expandafter\endgroup\next
-%
-% This is the old hack, which didn't work with 2e.
-% You should not need this since the rest of the documentation is now
-% LaTeX2e-only.
-%
-%\def\_{\ifnum\fam=\ttfamily \char'137\else{\tt\char'137}\fi}
-%\catcode`\_=12
-%\catcode`\_=\active\def_{\ifnum\fam=\ttfamily \char'137 \else{\tt\char'137}\fi}
-
-
%% Lots of index-entry generation support.
@@ -328,6 +318,12 @@
\endgroup%
}
+
+% Now for a lot of semantically-loaded environments that do a ton of magical
+% things to get the right formatting and index entries for the stuff in
+% Python modules and C API.
+
+
% {fulllineitems} is used in one place in libregex.tex, but is really for
% internal use in this file.
%
@@ -499,6 +495,8 @@
\newcommand{\EOF}{{\sc eof}}
\newcommand{\NULL}{\sectcode{NULL}}
+% Also for consistency: spell Python "Python", not "python"!
+
% code is the most difficult one...
\newcommand{\code}[1]{{\@vobeyspaces\@noligs\def\{{\char`\{}\def\}{\char`\}}\def\~{\char`\~}\def\^{\char`\^}\def\e{\char`\\}\def\${\char`\$}\def\#{\char`\#}\def\&{\char`\&}\def\%{\char`\%}%
\mbox{\codefont{#1}}}}
@@ -554,6 +552,8 @@
\let\member=\sectcode
\let\method=\sectcode
+\newcommand{\pytype}[1]{#1} % built-in Python type
+
\let\cfunction=\sectcode
\let\ctype=\sectcode
\let\cdata=\sectcode