@@ -12,8 +12,9 @@ \section{\module{imp} ---
1212
1313
1414\begin {funcdesc }{get_magic}{}
15+ \indexii {file}{byte-code}
1516Return the magic string value used to recognize byte-compiled code
16- files (`` \code {.pyc} files'' ). (This value may be different for each
17+ files (\file {.pyc} files). (This value may be different for each
1718Python version.)
1819\end {funcdesc }
1920
@@ -22,8 +23,8 @@ \section{\module{imp} ---
2223Each triple has the form \code {(\var {suffix}, \var {mode},
2324\var {type})}, where \var {suffix} is a string to be appended to the
2425module name to form the filename to search for, \var {mode} is the mode
25- string to pass to the built-in \code {open} function to open the file
26- (this can be \code {'r'} for text files or \code {'rb'} for binary
26+ string to pass to the built-in \function {open() } function to open the
27+ file (this can be \code {'r'} for text files or \code {'rb'} for binary
2728files), and \var {type} is the file type, which has one of the values
2829\constant {PY_SOURCE}, \constant {PY_COMPILED}, or
2930\constant {C_EXTENSION}, described below.
@@ -167,6 +168,7 @@ \section{\module{imp} ---
167168\end {funcdesc }
168169
169170\begin {funcdesc }{load_compiled}{name, pathname, file}
171+ \indexii {file}{byte-code}
170172Load and initialize a module implemented as a byte-compiled code file
171173and return its module object. If the module was already initialized,
172174it will be initialized \emph {again }. The \var {name} argument is used
@@ -200,8 +202,9 @@ \section{\module{imp} ---
200202file, open for reading as text, from the beginning.
201203It must currently be a real file
202204object, not a user-defined class emulating a file. Note that if a
203- properly matching byte-compiled file (with suffix \file {.pyc}) exists,
204- it will be used instead of parsing the given source file.
205+ properly matching byte-compiled file (with suffix \file {.pyc} or
206+ \file {.pyo}) exists, it will be used instead of parsing the given
207+ source file.
205208\end {funcdesc }
206209
207210
0 commit comments