1- \chapter {Simple statements\label {simple } }
1+ \chapter {Simple statements \label {simple } }
22\indexii {simple}{statement}
33
44Simple 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
2727Expression 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 }
6060assert_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 }
6666if __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
7171equivalent to
7272
7373\begin {verbatim }
@@ -76,7 +76,7 @@ \section{Assert statements\label{assert}}\stindex{assert}
7676\end {verbatim }
7777
7878These 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
8080variables with those names. In the current implementation, the
8181built-in variable \code {__debug__} is 1 under normal circumstances, 0
8282when optimization is requested (command line option -O). The current
@@ -86,11 +86,11 @@ \section{Assert statements\label{assert}}\stindex{assert}
8686it 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}}
137137targets in the target list, and the items are assigned, from left to
138138right, to the corresponding targets. (This rule is relaxed as of
139139Python 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
141141now legal as long as the string has the right length.)
142142
143143\end {itemize }
@@ -235,9 +235,9 @@ \section{Assignment statements\label{assignment}}
235235
236236WARNING: Although the definition of assignment implies that overlaps
237237between 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
239239collection 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 }
243243x = [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}}
265265class 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}}
293293right 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}}
353353before 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}}
363363If no expressions are present, \keyword {raise} re-raises the last
364364expression 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
367367a string, class, or instance object. If there is a second expression,
368368this is evaluated, else \code {None} is substituted. If the first
369369expression is a class object, then the second expression may be an
@@ -393,7 +393,7 @@ \section{The \keyword{raise} statement\label{raise}}
393393transparently 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}}
420420before 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}}
501501of them up in the module found in step (1), and binds the name in the
502502local 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
509509Names 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