@@ -196,9 +196,9 @@ \section{Assignment statements}
196196
197197WARNING: Although the definition of assignment implies that overlaps
198198between the left-hand side and the right-hand side are `safe' (e.g.
199- \verb @ a, b = b, a @ swaps two variables), overlaps within the
199+ \code { a, b = b, a} swaps two variables), overlaps within the
200200collection of assigned-to variables are not safe! For instance, the
201- following program prints \code@ [0, 2]@ :
201+ following program prints \code { [0, 2]} :
202202
203203\begin {verbatim }
204204x = [0, 1]
@@ -208,7 +208,7 @@ \section{Assignment statements}
208208\end {verbatim }
209209
210210
211- \section {The { \tt pass} statement }
211+ \section {The \keyword { pass} statement }
212212\stindex {pass}
213213
214214\begin {verbatim }
@@ -226,7 +226,7 @@ \section{The {\tt pass} statement}
226226class C: pass # a class with no methods (yet)
227227\end {verbatim }
228228
229- \section {The { \tt del} statement }
229+ \section {The \keyword { del} statement }
230230\stindex {del}
231231
232232\begin {verbatim }
@@ -254,7 +254,7 @@ \section{The {\tt del} statement}
254254right type (but even this is determined by the sliced object).
255255\indexii {attribute}{deletion}
256256
257- \section {The { \tt print} statement } \label {print }
257+ \section {The \keyword { print} statement } \label {print }
258258\stindex {print}
259259
260260\begin {verbatim }
@@ -269,21 +269,21 @@ \section{The {\tt print} statement} \label{print}
269269the output system believes it is positioned at the beginning of a
270270line. This is the case: (1) when no characters have yet been written
271271to standard output; or (2) when the last character written to standard
272- output is \verb / \n / ; or (3) when the last write operation on standard
272+ output is \character { \\ n} ; or (3) when the last write operation on standard
273273output was not a \keyword {print} statement. (In some cases it may be
274274functional to write an empty string to standard output for this
275275reason.)
276276\index {output}
277277\indexii {writing}{values}
278278
279- A \verb / "\n" / character is written at the end, unless the \keyword {print}
279+ A \character { \\ n} character is written at the end, unless the \keyword {print}
280280statement ends with a comma. This is the only action if the statement
281281contains just the keyword \keyword {print}.
282282\indexii {trailing}{comma}
283283\indexii {newline}{suppression}
284284
285- Standard output is defined as the file object named \verb @ stdout @
286- in the built-in module \verb @ sys @ . If no such object exists,
285+ Standard output is defined as the file object named \code { stdout}
286+ in the built-in module \module { sys} . If no such object exists,
287287or if it is not a writable file, a \exception {RuntimeError} exception is raised.
288288(The original implementation attempts to write to the system's original
289289standard output instead, but this is not safe, and should be fixed.)
@@ -292,7 +292,7 @@ \section{The {\tt print} statement} \label{print}
292292\ttindex {stdout}
293293\exindex {RuntimeError}
294294
295- \section {The { \tt return} statement }
295+ \section {The \keyword { return} statement }
296296\stindex {return}
297297
298298\begin {verbatim }
@@ -315,7 +315,7 @@ \section{The {\tt return} statement}
315315before really leaving the function.
316316\kwindex {finally}
317317
318- \section {The { \tt raise} statement }
318+ \section {The \keyword { raise} statement }
319319\stindex {raise}
320320
321321\begin {verbatim }
@@ -346,7 +346,7 @@ \section{The {\tt raise} statement}
346346transparently in an except clause.
347347\obindex {traceback}
348348
349- \section {The { \tt break} statement }
349+ \section {The \keyword { break} statement }
350350\stindex {break}
351351
352352\begin {verbatim }
@@ -373,7 +373,7 @@ \section{The {\tt break} statement}
373373before really leaving the loop.
374374\kwindex {finally}
375375
376- \section {The { \tt continue} statement }
376+ \section {The \keyword { continue} statement }
377377\stindex {continue}
378378
379379\begin {verbatim }
@@ -383,15 +383,15 @@ \section{The {\tt continue} statement}
383383\keyword {continue} may only occur syntactically nested in a \keyword {for} or
384384\keyword {while} loop, but not nested in a function or class definition or
385385\keyword {try} statement within that loop.\footnote {Except that it may
386- currently occur within an { \tt except} clause.}
386+ currently occur within an except clause.}
387387\stindex {for}
388388\stindex {while}
389389\indexii {loop}{statement}
390390\kwindex {finally}
391391
392392It continues with the next cycle of the nearest enclosing loop.
393393
394- \section {The { \tt import} statement } \label {import }
394+ \section {The \keyword { import} statement } \label {import }
395395\stindex {import}
396396
397397\begin {verbatim }
@@ -427,9 +427,8 @@ \section{The {\tt import} statement} \label{import}
427427\indexii {built-in}{module}
428428\indexii {user-defined}{module}
429429\refbimodindex {sys}
430- \ttindex {path}
431- \ttindex {sys.path}
432430\indexii {filename}{extension}
431+ \indexiii {module}{search}{path}
433432
434433If a built-in module is found, its built-in initialization code is
435434executed and step (1) is finished. If no matching file is found,
@@ -454,16 +453,16 @@ \section{The {\tt import} statement} \label{import}
454453of them up in the module found in step (1), and binds the name in the
455454local name space to the object thus found. If a name is not found,
456455\exception {ImportError} is raised. If the list of identifiers is replaced
457- by a star (\verb @ * @ ), all names defined in the module are bound,
458- except those beginning with an underscore(\verb @ _ @ ).
456+ by a star (\code {*} ), all names defined in the module are bound,
457+ except those beginning with an underscore(\code {_} ).
459458\indexii {name}{binding}
460459\exindex {ImportError}
461460
462461Names bound by import statements may not occur in \keyword {global}
463462statements in the same scope.
464463\stindex {global}
465464
466- The \keyword {from} form with \verb @ * @ may only occur in a module scope.
465+ The \keyword {from} form with \code {*} may only occur in a module scope.
467466\kwindex {from}
468467\ttindex {from ... import *}
469468
@@ -472,7 +471,7 @@ \section{The {\tt import} statement} \label{import}
472471implementations may enforce them or silently change the meaning of the
473472program.)
474473
475- \section {The { \tt global} statement } \label {global }
474+ \section {The \keyword { global} statement } \label {global }
476475\stindex {global}
477476
478477\begin {verbatim }
@@ -481,8 +480,8 @@ \section{The {\tt global} statement} \label{global}
481480
482481The \keyword {global} statement is a declaration which holds for the
483482entire current code block. It means that the listed identifiers are to be
484- interpreted as globals. While { \em using} global names is automatic
485- if they are not defined in the local scope, { \em assigning} to global
483+ interpreted as globals. While \emph { using } global names is automatic
484+ if they are not defined in the local scope, \emph { assigning } to global
486485names would be impossible without \keyword {global}.
487486\indexiii {global}{name}{binding}
488487
@@ -501,7 +500,7 @@ \section{The {\tt global} statement} \label{global}
501500Note: the \keyword {global} is a directive to the parser. Therefore, it
502501applies only to code parsed at the same time as the \keyword {global}
503502statement. In particular, a \keyword {global} statement contained in an
504- \keyword {exec} statement does not affect the code block { \em containing}
503+ \keyword {exec} statement does not affect the code block \emph { containing }
505504the \keyword {exec} statement, and code contained in an \keyword {exec}
506505statement is unaffected by \keyword {global} statements in the code
507506containing the \keyword {exec} statement. The same applies to the
0 commit comments