diff options
author | Martin Panter <vadmium+py@gmail.com> | 2015-12-10 06:47:06 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2015-12-10 06:47:06 (GMT) |
commit | 7dda421bfff887da9a84e99c37ef1b0ef9f3cde9 (patch) | |
tree | e39c07f91360571424cb92263f3f34434c974ec4 /Doc/library | |
parent | a29eb08fb97fff461b62682da4ee9ac6ea8db5bf (diff) | |
download | cpython-7dda421bfff887da9a84e99c37ef1b0ef9f3cde9.zip cpython-7dda421bfff887da9a84e99c37ef1b0ef9f3cde9.tar.gz cpython-7dda421bfff887da9a84e99c37ef1b0ef9f3cde9.tar.bz2 |
Issue #14285: Do not catch exceptions initializing any ancestor package
The previous fix only handled the case of the parent package of __main__
failing to initialize.
Also make the "Error while finding spec" formatting slightly more appealing,
and document and test that the module name must be absolute.
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/runpy.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/library/runpy.rst b/Doc/library/runpy.rst index 7293f15..78d0143 100644 --- a/Doc/library/runpy.rst +++ b/Doc/library/runpy.rst @@ -36,7 +36,8 @@ The :mod:`runpy` module provides two functions: import mechanism (refer to :pep:`302` for details) and then executed in a fresh module namespace. - If the supplied module name refers to a package rather than a normal + The *mod_name* argument should be an absolute module name. + If the module name refers to a package rather than a normal module, then that package is imported and the ``__main__`` submodule within that package is then executed and the resulting module globals dictionary returned. |