Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 37f1574

Browse files
committed
Use \citetitle and \programopt as appropriate.
1 parent e15eb35 commit 37f1574

13 files changed

Lines changed: 149 additions & 144 deletions

Doc/lib/lib.tex

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ \chapter*{Front Matter\label{front}}
3030
language. It supports a wide range of applications, from simple text
3131
processing scripts to interactive WWW browsers.
3232

33-
While the \emph{Python Reference Manual} describes the exact syntax and
34-
semantics of the language, it does not describe the standard library
35-
that is distributed with the language, and which greatly enhances its
36-
immediate usability. This library contains built-in modules (written
37-
in C) that provide access to system functionality such as file I/O
38-
that would otherwise be inaccessible to Python programmers, as well as
39-
modules written in Python that provide standardized solutions for many
40-
problems that occur in everyday programming. Some of these modules
41-
are explicitly designed to encourage and enhance the portability of
42-
Python programs.
33+
While the \citetitle[../ref/ref.html]{Python Reference Manual}
34+
describes the exact syntax and semantics of the language, it does not
35+
describe the standard library that is distributed with the language,
36+
and which greatly enhances its immediate usability. This library
37+
contains built-in modules (written in C) that provide access to system
38+
functionality such as file I/O that would otherwise be inaccessible to
39+
Python programmers, as well as modules written in Python that provide
40+
standardized solutions for many problems that occur in everyday
41+
programming. Some of these modules are explicitly designed to
42+
encourage and enhance the portability of Python programs.
4343

4444
This library reference manual documents Python's standard library, as
4545
well as many optional library modules (which may or may not be
@@ -50,11 +50,13 @@ \chapter*{Front Matter\label{front}}
5050
documented in the Reference Manual.
5151

5252
This manual assumes basic knowledge about the Python language. For an
53-
informal introduction to Python, see the \emph{Python Tutorial}; the
54-
\emph{Python Reference Manual} remains the highest authority on
55-
syntactic and semantic questions. Finally, the manual entitled
56-
\emph{Extending and Embedding the Python Interpreter} describes how to
57-
add new extensions to Python and how to embed it in other applications.
53+
informal introduction to Python, see the
54+
\citetitle[../tut/tut.html]{Python Tutorial}; the
55+
\citetitle[../ref/ref.html]{Python Reference Manual} remains the
56+
highest authority on syntactic and semantic questions. Finally, the
57+
manual entitled \citetitle[../ext/ext.html]{Extending and Embedding
58+
the Python Interpreter} describes how to add new extensions to Python
59+
and how to embed it in other applications.
5860

5961
\end{abstract}
6062

Doc/lib/libcurses.tex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ \section{\module{curses} ---
1616

1717
\begin{seealso}
1818
\seetext{Tutorial material on using curses with Python is available
19-
on the Python Web site as Andrew Kuchling's \emph{Curses
19+
on the Python Web site as Andrew Kuchling's
20+
\citetitle[http://www.python.org/doc/howto/curses/curses.html]{Curses
2021
Programming with Python}, at
2122
\url{http://www.python.org/doc/howto/curses/curses.html}.}
2223
\end{seealso}

Doc/lib/libexcs.tex

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,17 @@ \section{Built-in Exceptions}
1111
exceptions is present in the standard library module
1212
\module{exceptions}; this module never needs to be imported explicitly.
1313

14-
For backward compatibility, when Python is invoked with the \code{-X}
15-
option, most of the standard exceptions are strings\footnote{For
16-
forward-compatibility the new exceptions \exception{Exception},
17-
\exception{LookupError},
18-
\exception{ArithmeticError}, \exception{EnvironmentError}, and
19-
\exception{StandardError} are tuples.}. This option may be used to
20-
run code that breaks because of the different semantics of class based
21-
exceptions. The \code{-X} option will become obsolete in future
22-
Python versions, so the recommended solution is to fix the code.
14+
For backward compatibility, when Python is invoked with the
15+
\programopt{-X} option, most of the standard exceptions are
16+
strings\footnote{
17+
For forward-compatibility the new exceptions \exception{Exception},
18+
\exception{LookupError}, \exception{ArithmeticError},
19+
\exception{EnvironmentError}, and \exception{StandardError} are
20+
tuples.
21+
}. This option may be used to run code that breaks because of the
22+
different semantics of class based exceptions. The
23+
\programopt{-X} option will become obsolete in future Python versions,
24+
so the recommended solution is to fix the code.
2325

2426
Two distinct string objects with the same value are considered different
2527
exceptions. This is done to force programmers to use exception names
@@ -122,8 +124,8 @@ \section{Built-in Exceptions}
122124
\setindexsubitem{(built-in exception)}
123125

124126
The following exceptions are the exceptions that are actually raised.
125-
They are class objects, except when the \code{-X} option is used to
126-
revert back to string-based standard exceptions.
127+
They are class objects, except when the \programopt{-X} option is used
128+
to revert back to string-based standard exceptions.
127129

128130
\begin{excdesc}{AssertionError}
129131
Raised when an \keyword{assert} statement fails.
@@ -150,7 +152,7 @@ \section{Built-in Exceptions}
150152
\begin{excdesc}{FloatingPointError}
151153
Raised when a floating point operation fails. This exception is
152154
always defined, but can only be raised when Python is configured
153-
with the \code{--with-fpectl} option, or the
155+
with the \programopt{-}\programopt{-with-fpectl} option, or the
154156
\constant{WANT_SIGFPE_HANDLER} symbol is defined in the
155157
\file{config.h} file.
156158
\end{excdesc}

Doc/lib/libimaplib.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ \section{\module{imaplib} ---
7272
extensive example of usage.
7373

7474
\begin{seealso}
75-
\seetext{Documents describing the protocol, and sources and binaries
76-
for servers implementing it, can all be found at the University of
77-
Washington's \emph{IMAP Information Center}
78-
(\url{http://www.cac.washington.edu/imap/}).}
75+
\seetext{Documents describing the protocol, and sources and binaries
76+
for servers implementing it, can all be found at the
77+
University of Washington's \emph{IMAP Information Center}
78+
(\url{http://www.cac.washington.edu/imap/}).}
7979
\end{seealso}
8080

8181

Doc/lib/libobjs.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ \chapter{Built-in Types, Exceptions and Functions}
2020
grouping operators that have the same priority in the same box.
2121
Binary operators of the same priority group from left to right.
2222
(Unary operators group from right to left, but there you have no real
23-
choice.) See Chapter 5 of the \emph{Python Reference Manual} for the
24-
complete picture on operator priorities.
23+
choice.) See Chapter 5 of the \citetitle[../ref/ref.html]{Python
24+
Reference Manual} for the complete picture on operator priorities.

Doc/lib/libparser.tex

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,23 @@ \section{\module{parser} ---
3535

3636
Most importantly, a good understanding of the Python grammar processed
3737
by the internal parser is required. For full information on the
38-
language syntax, refer to the \emph{Python Language Reference}. The
39-
parser itself is created from a grammar specification defined in the file
40-
\file{Grammar/Grammar} in the standard Python distribution. The parse
41-
trees stored in the AST objects created by this module are the
42-
actual output from the internal parser when created by the
43-
\function{expr()} or \function{suite()} functions, described below. The AST
44-
objects created by \function{sequence2ast()} faithfully simulate those
45-
structures. Be aware that the values of the sequences which are
46-
considered ``correct'' will vary from one version of Python to another
47-
as the formal grammar for the language is revised. However,
48-
transporting code from one Python version to another as source text
49-
will always allow correct parse trees to be created in the target
50-
version, with the only restriction being that migrating to an older
51-
version of the interpreter will not support more recent language
52-
constructs. The parse trees are not typically compatible from one
53-
version to another, whereas source code has always been
54-
forward-compatible.
38+
language syntax, refer to the \citetitle[../ref/ref.html]{Python
39+
Language Reference}. The parser itself is created from a grammar
40+
specification defined in the file \file{Grammar/Grammar} in the
41+
standard Python distribution. The parse trees stored in the AST
42+
objects created by this module are the actual output from the internal
43+
parser when created by the \function{expr()} or \function{suite()}
44+
functions, described below. The AST objects created by
45+
\function{sequence2ast()} faithfully simulate those structures. Be
46+
aware that the values of the sequences which are considered
47+
``correct'' will vary from one version of Python to another as the
48+
formal grammar for the language is revised. However, transporting
49+
code from one Python version to another as source text will always
50+
allow correct parse trees to be created in the target version, with
51+
the only restriction being that migrating to an older version of the
52+
interpreter will not support more recent language constructs. The
53+
parse trees are not typically compatible from one version to another,
54+
whereas source code has always been forward-compatible.
5555

5656
Each element of the sequences returned by \function{ast2list()} or
5757
\function{ast2tuple()} has a simple form. Sequences representing

Doc/lib/libsocket.tex

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ \section{\module{socket} ---
99
It is available on \UNIX{} systems that support this interface.
1010

1111
For an introduction to socket programming (in C), see the following
12-
papers: \emph{An Introductory 4.3BSD Interprocess Communication
13-
Tutorial}, by Stuart Sechrest and \emph{An Advanced 4.3BSD Interprocess
14-
Communication Tutorial}, by Samuel J. Leffler et al, both in the
15-
\UNIX{} Programmer's Manual, Supplementary Documents 1 (sections PS1:7
16-
and PS1:8). The \UNIX{} manual pages for the various socket-related
17-
system calls are also a valuable source of information on the details of
18-
socket semantics.
12+
papers: \citetitle{An Introductory 4.3BSD Interprocess Communication
13+
Tutorial}, by Stuart Sechrest and \citetitle{An Advanced 4.3BSD
14+
Interprocess Communication Tutorial}, by Samuel J. Leffler et al,
15+
both in the \citetitle{\UNIX{} Programmer's Manual, Supplementary Documents 1}
16+
(sections PS1:7 and PS1:8). The \UNIX{} manual pages for the various
17+
socket-related system calls are also a valuable source of information
18+
on the details of socket semantics.
1919

2020
The Python interface is a straightforward transliteration of the
2121
\UNIX{} system call and library interface for sockets to Python's

Doc/lib/libsocksvr.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ \section{\module{SocketServer} ---
1616
\class{UnixStreamServer} and \class{UnixDatagramServer} classes are
1717
similar, but use \UNIX{} domain sockets; they're not available on
1818
non-\UNIX{} platforms. For more details on network programming, consult
19-
a book such as W. Richard Steven's \emph{UNIX Network Programming}
20-
or Ralph Davis's \emph{Win32 Network Programming}.
19+
a book such as W. Richard Steven's \citetitle{UNIX Network Programming}
20+
or Ralph Davis's \citetitle{Win32 Network Programming}.
2121

2222
These four classes process requests \dfn{synchronously}; each request
2323
must be completed before the next request can be started. This isn't

Doc/lib/libsoundex.tex

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,12 @@ \section{\module{soundex} ---
3232

3333

3434
\begin{seealso}
35-
36-
\seetext{Donald E. Knuth, \emph{Sorting and Searching,} vol. 3 in
37-
``The Art of Computer Programming.'' Addison-Wesley Publishing
38-
Company: Reading, MA: 1973. pp.\ 391-392. Discusses the origin and
39-
usefulness of the algorithm, as well as the algorithm itself. Knuth
40-
gives his sources as \emph{U.S. Patents 1261167} (1918) and
41-
\emph{1435663} (1922), attributing the algorithm to Margaret K. Odell
42-
and Robert C. Russel. Additional references are provided.}
43-
35+
\seetext{Donald E. Knuth, \citetitle{Sorting and Searching}, vol. 3
36+
in ``The Art of Computer Programming.'' Addison-Wesley
37+
Publishing Company: Reading, MA: 1973. pp.\ 391-392.
38+
Discusses the origin and usefulness of the algorithm, as
39+
well as the algorithm itself. Knuth gives his sources as
40+
\emph{U.S. Patents 1261167} (1918) and \emph{1435663}
41+
(1922), attributing the algorithm to Margaret K. Odell and
42+
Robert C. Russel. Additional references are provided.}
4443
\end{seealso}

Doc/lib/libstdtypes.tex

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -302,14 +302,14 @@ \subsection{Sequence Types \label{typesseq}}
302302
There are three sequence types: strings, lists and tuples.
303303

304304
Strings literals are written in single or double quotes:
305-
\code{'xyzzy'}, \code{"frobozz"}. See Chapter 2 of the \emph{Python
306-
Reference Manual} for more about string literals. Lists are
307-
constructed with square brackets, separating items with commas:
308-
\code{[a, b, c]}. Tuples are constructed by the comma operator (not
309-
within square brackets), with or without enclosing parentheses, but an
310-
empty tuple must have the enclosing parentheses, e.g.,
311-
\code{a, b, c} or \code{()}. A single item tuple must have a trailing
312-
comma, e.g., \code{(d,)}.
305+
\code{'xyzzy'}, \code{"frobozz"}. See Chapter 2 of the
306+
\citetitle[../ref/ref.html]{Python Reference Manual} for more about
307+
string literals. Lists are constructed with square brackets,
308+
separating items with commas: \code{[a, b, c]}. Tuples are
309+
constructed by the comma operator (not within square brackets), with
310+
or without enclosing parentheses, but an empty tuple must have the
311+
enclosing parentheses, e.g., \code{a, b, c} or \code{()}. A single
312+
item tuple must have a trailing comma, e.g., \code{(d,)}.
313313
\indexii{sequence}{types}
314314
\indexii{string}{type}
315315
\indexii{tuple}{type}
@@ -629,7 +629,8 @@ \subsubsection{Modules \label{typesmodules}}
629629
\subsubsection{Classes and Class Instances \label{typesobjects}}
630630
\nodename{Classes and Instances}
631631

632-
See Chapters 3 and 7 of the \emph{Python Reference Manual} for these.
632+
See Chapters 3 and 7 of the \citetitle[../ref/ref.html]{Python
633+
Reference Manual} for these.
633634

634635

635636
\subsubsection{Functions \label{typesfunctions}}
@@ -667,7 +668,8 @@ \subsubsection{Methods \label{typesmethods}}
667668
calling \code{\var{m}.im_func(\var{m}.im_self, \var{arg-1},
668669
\var{arg-2}, \textrm{\ldots}, \var{arg-n})}.
669670

670-
See the \emph{Python Reference Manual} for more information.
671+
See the \citetitle[../ref/ref.html]{Python Reference Manual} for more
672+
information.
671673

672674

673675
\subsubsection{Code Objects \label{bltin-code-objects}}
@@ -689,7 +691,8 @@ \subsubsection{Code Objects \label{bltin-code-objects}}
689691
\stindex{exec}
690692
\bifuncindex{eval}
691693

692-
See the \emph{Python Reference Manual} for more information.
694+
See the \citetitle[../ref/ref.html]{Python Reference Manual} for more
695+
information.
693696

694697

695698
\subsubsection{Type Objects \label{bltin-type-objects}}
@@ -715,9 +718,10 @@ \subsubsection{The Null Object \label{bltin-null-object}}
715718

716719
\subsubsection{The Ellipsis Object \label{bltin-ellipsis-object}}
717720

718-
This object is used by extended slice notation (see the \emph{Python
719-
Reference Manual}). It supports no special operations. There is
720-
exactly one ellipsis object, named \code{Ellipsis} (a built-in name).
721+
This object is used by extended slice notation (see the
722+
\citetitle[../ref/ref.html]{Python Reference Manual}). It supports no
723+
special operations. There is exactly one ellipsis object, named
724+
\constant{Ellipsis} (a built-in name).
721725

722726
It is written as \code{Ellipsis}.
723727

@@ -868,9 +872,9 @@ \subsubsection{File Objects\obindex{file}
868872

869873
\subsubsection{Internal Objects \label{typesinternal}}
870874

871-
See the \emph{Python Reference Manual} for this information. It
872-
describes code objects, stack frame objects, traceback objects, and
873-
slice objects.
875+
See the \citetitle[../ref/ref.html]{Python Reference Manual} for this
876+
information. It describes code objects, stack frame objects,
877+
traceback objects, and slice objects.
874878

875879

876880
\subsection{Special Attributes \label{specialattrs}}

0 commit comments

Comments
 (0)