[New-bugs-announce] [issue19963] Update docs for importlib.import_module()

Brett Cannon report at bugs.python.org
Thu Dec 12 16:51:28 CET 2013


New submission from Brett Cannon:

The docs for importlib.import_module() say that you need to import parent packages first, but this is actually no longer the case (thankfully):

Python 3.4.0b1 (default:a3bdbe220f8a, Dec 10 2013, 11:07:04) 
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> 'test' in sys.modules
False
>>> import importlib
>>> importlib.import_module('test.test_importlib.source')
<module 'test.test_importlib.source' from '/usr/local/google/home/bcannon/Repos/cpython/default/Lib/test/test_importlib/source/__init__.py'>


Also need to check if this is false in Python 3.3 (or wherever the change occurred) to update the docs there and to add a versionchanged flag.

----------
assignee: brett.cannon
components: Documentation
messages: 205958
nosy: brett.cannon
priority: normal
severity: normal
stage: needs patch
status: open
title: Update docs for importlib.import_module()
versions: Python 3.3, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19963>
_______________________________________


More information about the New-bugs-announce mailing list