summaryrefslogtreecommitdiffstats
path: root/Doc/reference/import.rst
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2013-05-25 15:33:13 (GMT)
committerBrett Cannon <brett@python.org>2013-05-25 15:33:13 (GMT)
commitb961955e95107e7667944e91bea50bfb760285b7 (patch)
tree7e0e8d6d343a3250584bebd172a2aad73bfa16d4 /Doc/reference/import.rst
parent21cc628e4cb0e2d8bffb99bd8d7fd2868b592983 (diff)
parent4b4e38e7d4bd62f2b1cae187ff51428846b720b5 (diff)
downloadcpython-b961955e95107e7667944e91bea50bfb760285b7.zip
cpython-b961955e95107e7667944e91bea50bfb760285b7.tar.gz
cpython-b961955e95107e7667944e91bea50bfb760285b7.tar.bz2
merge
Diffstat (limited to 'Doc/reference/import.rst')
-rw-r--r--Doc/reference/import.rst6
1 files changed, 5 insertions, 1 deletions
diff --git a/Doc/reference/import.rst b/Doc/reference/import.rst
index 9c52435..b587fc9 100644
--- a/Doc/reference/import.rst
+++ b/Doc/reference/import.rst
@@ -353,7 +353,11 @@ Loaders must satisfy the following requirements:
* The loader may set the ``__file__`` attribute of the module. If set, this
attribute's value must be a string. The loader may opt to leave
``__file__`` unset if it has no semantic meaning (e.g. a module loaded from
- a database).
+ a database). If ``__file__`` is set, it may also be appropriate to set the
+ ``__cached__`` attribute which is the path to any compiled version of the
+ code (e.g. byte-compiled file). The file does not need to exist to set this
+ attribute; the path can simply point to whether the compiled file would
+ exist (see :pep:`3147`).
* The loader may set the ``__name__`` attribute of the module. While not
required, setting this attribute is highly recommended so that the