Skip to content

Commit 99acdb6

Browse files
author
fdrake
committed
Added cross-references to related material on exceptions.
Closes SF bug #217195. Make sure section numbers wrap together with the preceeding word ("section"). git-svn-id: http://svn.python.org/projects/python/trunk@29315 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 9eb6f8e commit 99acdb6

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

Doc/ref/ref7.tex

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ \section{The \keyword{if} statement\label{if}}
8383
\end{productionlist}
8484

8585
It selects exactly one of the suites by evaluating the expressions one
86-
by one until one is found to be true (see section \ref{Booleans} for
86+
by one until one is found to be true (see section~\ref{Booleans} for
8787
the definition of true and false); then that suite is executed (and no
8888
other part of the \keyword{if} statement is executed or evaluated). If
8989
all expressions are false, the suite of the \keyword{else} clause, if
@@ -251,7 +251,7 @@ \section{The \keyword{try} statement\label{try}}
251251
\module{sys}\refbimodindex{sys} module: \code{sys.exc_type} receives
252252
the object identifying the exception; \code{sys.exc_value} receives
253253
the exception's parameter; \code{sys.exc_traceback} receives a
254-
traceback object\obindex{traceback} (see section \ref{traceback})
254+
traceback object\obindex{traceback} (see section~\ref{traceback})
255255
identifying the point in the program where the exception occurred.
256256
These details are also available through the \function{sys.exc_info()}
257257
function, which returns a tuple \code{(\var{exc_type}, \var{exc_value},
@@ -299,13 +299,17 @@ \section{The \keyword{try} statement\label{try}}
299299
\stindex{break}
300300
\stindex{continue}
301301

302+
Additional information on exceptions can be found in
303+
section~\ref{exceptions}, and information on using the \keyword{raise}
304+
statement to generate exceptions may be found in section~\ref{raise}.
305+
302306

303307
\section{Function definitions\label{function}}
304308
\indexii{function}{definition}
305309
\stindex{def}
306310

307311
A function definition defines a user-defined function object (see
308-
section \ref{types}):
312+
section~\ref{types}):
309313
\obindex{user-defined function}
310314
\obindex{function}
311315

@@ -368,8 +372,8 @@ \section{Function definitions\label{function}}
368372
return penguin
369373
\end{verbatim}
370374

371-
Function call semantics are described in more detail in section
372-
\ref{calls}.
375+
Function call semantics are described in more detail in
376+
section~\ref{calls}.
373377
A function call always assigns values to all parameters mentioned in
374378
the parameter list, either from position arguments, from keyword
375379
arguments, or from default values. If the form ``\code{*identifier}''
@@ -381,7 +385,7 @@ \section{Function definitions\label{function}}
381385

382386
It is also possible to create anonymous functions (functions not bound
383387
to a name), for immediate use in expressions. This uses lambda forms,
384-
described in section \ref{lambda}. Note that the lambda form is
388+
described in section~\ref{lambda}. Note that the lambda form is
385389
merely a shorthand for a simplified function definition; a function
386390
defined in a ``\keyword{def}'' statement can be passed around or
387391
assigned to another name just like a function defined by a lambda
@@ -393,14 +397,14 @@ \section{Function definitions\label{function}}
393397
``\code{def}'' form executed inside a function definition defines a
394398
local function that can be returned or passed around. Free variables
395399
used in the nested function can access the local variables of the
396-
function containing the def. See section \ref{naming} for details.
400+
function containing the def. See section~\ref{naming} for details.
397401

398402

399403
\section{Class definitions\label{class}}
400404
\indexii{class}{definition}
401405
\stindex{class}
402406

403-
A class definition defines a class object (see section \ref{types}):
407+
A class definition defines a class object (see section~\ref{types}):
404408
\obindex{class}
405409

406410
\begin{productionlist}
@@ -416,7 +420,7 @@ \section{Class definitions\label{class}}
416420
A class definition is an executable statement. It first evaluates the
417421
inheritance list, if present. Each item in the inheritance list
418422
should evaluate to a class object. The class's suite is then executed
419-
in a new execution frame (see section \ref{naming}), using a newly
423+
in a new execution frame (see section~\ref{naming}), using a newly
420424
created local namespace and the original global namespace.
421425
(Usually, the suite contains only function definitions.) When the
422426
class's suite finishes execution, its execution frame is discarded but

0 commit comments

Comments
 (0)