]> granicus.if.org Git - python/commitdiff
Indexing is a mess; try to get the link targets closer to the relevant
authorFred Drake <fdrake@acm.org>
Tue, 15 Jul 2003 22:03:00 +0000 (22:03 +0000)
committerFred Drake <fdrake@acm.org>
Tue, 15 Jul 2003 22:03:00 +0000 (22:03 +0000)
text.  There needs to be a better way.

Doc/ref/ref3.tex
Doc/ref/ref6.tex

index 167d885465ecc9d9a04da3e7730a5896865931f3..785a995aea2a52232fdf6701c981bc10bc6e0ddb 100644 (file)
@@ -610,7 +610,8 @@ is a shorthand for \code{x.__call__(arguments)}.
 
 \item[Modules]
 Modules are imported by the \keyword{import} statement (see
-section~\ref{import}, ``The \keyword{import} statement'').
+section~\ref{import}, ``The \keyword{import} statement'').%
+\stindex{import}\obindex{module}
 A module object has a namespace implemented by a dictionary object
 (this is the dictionary referenced by the func_globals attribute of
 functions defined in the module).  Attribute references are translated
@@ -619,8 +620,6 @@ to lookups in this dictionary, e.g., \code{m.x} is equivalent to
 A module object does not contain the code object used to
 initialize the module (since it isn't needed once the initialization
 is done).
-\stindex{import}
-\obindex{module}
 
 Attribute assignment updates the module's namespace dictionary,
 e.g., \samp{m.x = 1} is equivalent to \samp{m.__dict__["x"] = 1}.
index 00b7c78d039ef7f2f25c9ae11a9a04ab1eeca411..4e966bf509630e314512bd07d23ef6bf67fb4fd1 100644 (file)
@@ -660,18 +660,16 @@ given as \code{sys.path}.
 \indexii{filename}{extension}
 \indexiii{module}{search}{path}
 
-If a built-in module is found, its built-in initialization code is
-executed and step (1) is finished.  If no matching file is found,
-\exception{ImportError} is raised.  If a file is found, it is parsed,
+If a built-in module is found,\indexii{module}{initialization} its
+built-in initialization code is executed and step (1) is finished.  If
+no matching file is found,
+\exception{ImportError}\exindex{ImportError} is raised.
+\index{code block}If a file is found, it is parsed,
 yielding an executable code block.  If a syntax error occurs,
-\exception{SyntaxError} is raised.  Otherwise, an empty module of the given
-name is created and inserted in the module table, and then the code
-block is executed in the context of this module.  Exceptions during
-this execution terminate step (1).
-\indexii{module}{initialization}
-\exindex{SyntaxError}
-\exindex{ImportError}
-\index{code block}
+\exception{SyntaxError}\exindex{SyntaxError} is raised.  Otherwise, an
+empty module of the given name is created and inserted in the module
+table, and then the code block is executed in the context of this
+module.  Exceptions during this execution terminate step (1).
 
 When step (1) finishes without raising an exception, step (2) can
 begin.