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

Skip to content

Commit 011f6fc

Browse files
committed
Typo: "Otherwose" --> "Otherwise" (reported by Joakim Sernbrant
<[email protected]>). Misc. small fixes to the logical markup.
1 parent 79d41cc commit 011f6fc

1 file changed

Lines changed: 29 additions & 29 deletions

File tree

Doc/ref/ref6.tex

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
\chapter{Simple statements\label{simple}}
1+
\chapter{Simple statements \label{simple}}
22
\indexii{simple}{statement}
33

44
Simple statements are comprised within a single logical line.
@@ -21,7 +21,7 @@ \chapter{Simple statements\label{simple}}
2121
| exec_stmt
2222
\end{verbatim}
2323

24-
\section{Expression statements\label{exprstmts}}
24+
\section{Expression statements \label{exprstmts}}
2525
\indexii{expression}{statement}
2626

2727
Expression statements are used (mostly interactively) to compute and
@@ -51,23 +51,23 @@ \section{Expression statements\label{exprstmts}}
5151
\indexii{writing}{values}
5252
\indexii{procedure}{call}
5353

54-
\section{Assert statements\label{assert}}\stindex{assert}
54+
\section{Assert statements \label{assert}}
5555

56-
Assert statements are a convenient way to insert debugging
57-
assertions\indexii{debugging}{assertions} into a program:
56+
Assert statements\stindex{assert} are a convenient way to insert
57+
debugging assertions\indexii{debugging}{assertions} into a program:
5858

5959
\begin{verbatim}
6060
assert_statement: "assert" expression ["," expression]
6161
\end{verbatim}
6262

63-
The simple form, ``\code{assert expression}'', is equivalent to
63+
The simple form, \samp{assert expression}, is equivalent to
6464

6565
\begin{verbatim}
6666
if __debug__:
6767
if not expression: raise AssertionError
6868
\end{verbatim}
6969

70-
The extended form, ``\code{assert expression1, expression2}'', is
70+
The extended form, \samp{assert expression1, expression2}, is
7171
equivalent to
7272

7373
\begin{verbatim}
@@ -76,7 +76,7 @@ \section{Assert statements\label{assert}}\stindex{assert}
7676
\end{verbatim}
7777

7878
These equivalences assume that \code{__debug__}\ttindex{__debug__} and
79-
\code{AssertionError}\exindex{AssertionError} refer to the built-in
79+
\exception{AssertionError}\exindex{AssertionError} refer to the built-in
8080
variables with those names. In the current implementation, the
8181
built-in variable \code{__debug__} is 1 under normal circumstances, 0
8282
when optimization is requested (command line option -O). The current
@@ -86,11 +86,11 @@ \section{Assert statements\label{assert}}\stindex{assert}
8686
it will be displayed as part of the stack trace.
8787

8888

89-
\section{Assignment statements\label{assignment}}
90-
\indexii{assignment}{statement}
89+
\section{Assignment statements \label{assignment}}
9190

92-
Assignment statements are used to (re)bind names to values and to
93-
modify attributes or items of mutable objects:
91+
Assignment statements\indexii{assignment}{statement} are used to
92+
(re)bind names to values and to modify attributes or items of mutable
93+
objects:
9494
\indexii{binding}{name}
9595
\indexii{rebinding}{name}
9696
\obindex{mutable}
@@ -137,7 +137,7 @@ \section{Assignment statements\label{assignment}}
137137
targets in the target list, and the items are assigned, from left to
138138
right, to the corresponding targets. (This rule is relaxed as of
139139
Python 1.5; in earlier versions, the object had to be a tuple. Since
140-
strings are sequences, an assignment like ``\code{a, b = "xy"}'' is
140+
strings are sequences, an assignment like \samp{a, b = "xy"} is
141141
now legal as long as the string has the right length.)
142142

143143
\end{itemize}
@@ -235,9 +235,9 @@ \section{Assignment statements\label{assignment}}
235235

236236
WARNING: Although the definition of assignment implies that overlaps
237237
between the left-hand side and the right-hand side are `safe' (e.g.,
238-
``\code{a, b = b, a}'' swaps two variables), overlaps \emph{within} the
238+
\samp{a, b = b, a} swaps two variables), overlaps \emph{within} the
239239
collection of assigned-to variables are not safe! For instance, the
240-
following program prints ``\code{[0, 2]}'':
240+
following program prints \samp{[0, 2]}:
241241

242242
\begin{verbatim}
243243
x = [0, 1]
@@ -247,7 +247,7 @@ \section{Assignment statements\label{assignment}}
247247
\end{verbatim}
248248

249249

250-
\section{The \keyword{pass} statement\label{pass}}
250+
\section{The \keyword{pass} statement \label{pass}}
251251
\stindex{pass}
252252

253253
\begin{verbatim}
@@ -265,7 +265,7 @@ \section{The \keyword{pass} statement\label{pass}}
265265
class C: pass # a class with no methods (yet)
266266
\end{verbatim}
267267

268-
\section{The \keyword{del} statement\label{del}}
268+
\section{The \keyword{del} statement \label{del}}
269269
\stindex{del}
270270

271271
\begin{verbatim}
@@ -293,7 +293,7 @@ \section{The \keyword{del} statement\label{del}}
293293
right type (but even this is determined by the sliced object).
294294
\indexii{attribute}{deletion}
295295

296-
\section{The \keyword{print} statement\label{print}}
296+
\section{The \keyword{print} statement \label{print}}
297297
\stindex{print}
298298

299299
\begin{verbatim}
@@ -330,7 +330,7 @@ \section{The \keyword{print} statement\label{print}}
330330
\withsubitem{(in module sys)}{\ttindex{stdout}}
331331
\exindex{RuntimeError}
332332

333-
\section{The \keyword{return} statement\label{return}}
333+
\section{The \keyword{return} statement \label{return}}
334334
\stindex{return}
335335

336336
\begin{verbatim}
@@ -353,7 +353,7 @@ \section{The \keyword{return} statement\label{return}}
353353
before really leaving the function.
354354
\kwindex{finally}
355355

356-
\section{The \keyword{raise} statement\label{raise}}
356+
\section{The \keyword{raise} statement \label{raise}}
357357
\stindex{raise}
358358

359359
\begin{verbatim}
@@ -363,7 +363,7 @@ \section{The \keyword{raise} statement\label{raise}}
363363
If no expressions are present, \keyword{raise} re-raises the last
364364
expression that was raised in the current scope.
365365

366-
Otherwose, \keyword{raise} evaluates its first expression, which must yield
366+
Otherwise, \keyword{raise} evaluates its first expression, which must yield
367367
a string, class, or instance object. If there is a second expression,
368368
this is evaluated, else \code{None} is substituted. If the first
369369
expression is a class object, then the second expression may be an
@@ -393,7 +393,7 @@ \section{The \keyword{raise} statement\label{raise}}
393393
transparently in an except clause.
394394
\obindex{traceback}
395395

396-
\section{The \keyword{break} statement\label{break}}
396+
\section{The \keyword{break} statement \label{break}}
397397
\stindex{break}
398398

399399
\begin{verbatim}
@@ -420,7 +420,7 @@ \section{The \keyword{break} statement\label{break}}
420420
before really leaving the loop.
421421
\kwindex{finally}
422422

423-
\section{The \keyword{continue} statement\label{continue}}
423+
\section{The \keyword{continue} statement \label{continue}}
424424
\stindex{continue}
425425

426426
\begin{verbatim}
@@ -439,7 +439,7 @@ \section{The \keyword{continue} statement\label{continue}}
439439
\indexii{loop}{statement}
440440
\kwindex{finally}
441441

442-
\section{The \keyword{import} statement\label{import}}
442+
\section{The \keyword{import} statement \label{import}}
443443
\stindex{import}
444444

445445
\begin{verbatim}
@@ -501,16 +501,16 @@ \section{The \keyword{import} statement\label{import}}
501501
of them up in the module found in step (1), and binds the name in the
502502
local namespace to the object thus found. If a name is not found,
503503
\exception{ImportError} is raised. If the list of identifiers is replaced
504-
by a star (\code{*}), all names defined in the module are bound,
505-
except those beginning with an underscore(\code{_}).
504+
by a star (\samp{*}), all names defined in the module are bound,
505+
except those beginning with an underscore (\character{_}).
506506
\indexii{name}{binding}
507507
\exindex{ImportError}
508508

509509
Names bound by \keyword{import} statements may not occur in
510510
\keyword{global} statements in the same scope.
511511
\stindex{global}
512512

513-
The \keyword{from} form with \code{*} may only occur in a module scope.
513+
The \keyword{from} form with \samp{*} may only occur in a module scope.
514514
\kwindex{from}
515515
\stindex{from}
516516

@@ -534,7 +534,7 @@ \section{The \keyword{import} statement\label{import}}
534534
[XXX Also should mention __import__().]
535535
\bifuncindex{__import__}
536536

537-
\section{The \keyword{global} statement\label{global}}
537+
\section{The \keyword{global} statement \label{global}}
538538
\stindex{global}
539539

540540
\begin{verbatim}
@@ -574,7 +574,7 @@ \section{The \keyword{global} statement\label{global}}
574574
\bifuncindex{execfile}
575575
\bifuncindex{compile}
576576

577-
\section{The \keyword{exec} statement\label{exec}}
577+
\section{The \keyword{exec} statement \label{exec}}
578578
\stindex{exec}
579579

580580
\begin{verbatim}

0 commit comments

Comments
 (0)