summaryrefslogtreecommitdiffstats
path: root/Doc/reference/datamodel.rst
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2012-07-31 20:03:09 (GMT)
committerBarry Warsaw <barry@python.org>2012-07-31 20:03:09 (GMT)
commitdadebab42c87e29342de67501a6b280e547fb633 (patch)
treee472033f9865ed1be7043ae3e6c9be7e1ce67815 /Doc/reference/datamodel.rst
parentcbc4c1930f864a872b2457768921af9903e5c1a6 (diff)
downloadcpython-dadebab42c87e29342de67501a6b280e547fb633.zip
cpython-dadebab42c87e29342de67501a6b280e547fb633.tar.gz
cpython-dadebab42c87e29342de67501a6b280e547fb633.tar.bz2
Finally, a coherent set of terminology for all the lil' beasties involved.
Diffstat (limited to 'Doc/reference/datamodel.rst')
-rw-r--r--Doc/reference/datamodel.rst19
1 files changed, 10 insertions, 9 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index b78997a..8dca8aa 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -652,15 +652,16 @@ Modules
object: module
Modules are a basic organizational unit of Python code, and are created by
- the :ref:`importmachinery` as invoked either by the :keyword:`import`
- statement (see section :ref:`import`) or by calling the built in
- :func:`__import__` function. A module object has a namespace implemented
- by a dictionary object (this is the dictionary referenced by the
- ``__globals__`` attribute of functions defined in the module). Attribute
- references are translated to lookups in this dictionary, e.g., ``m.x`` is
- equivalent to ``m.__dict__["x"]``. A module object does not contain the
- code object used to initialize the module (since it isn't needed once the
- initialization is done).
+ the :ref:`import system <importsystem>` as invoked either by the
+ :keyword:`import` statement (see :keyword:`import`), or by calling
+ functions such as :func:`importlib.import_module` and built-in
+ :func:`__import__`. A module object has a namespace implemented by a
+ dictionary object (this is the dictionary referenced by the ``__globals__``
+ attribute of functions defined in the module). Attribute references are
+ translated to lookups in this dictionary, e.g., ``m.x`` is equivalent to
+ ``m.__dict__["x"]``. A module object does not contain the code object used
+ to initialize the module (since it isn't needed once the initialization is
+ done).
Attribute assignment updates the module's namespace dictionary, e.g.,
``m.x = 1`` is equivalent to ``m.__dict__["x"] = 1``.