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 <rep...@bugs.python.org>
<http://bugs.python.org/issue19963>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to