diff options
author | R David Murray <rdmurray@bitdance.com> | 2012-07-18 23:44:08 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2012-07-18 23:44:08 (GMT) |
commit | 59488d233bb663af24492759fd0316ab499200d0 (patch) | |
tree | 3d0245a56a78369552d460ab358d375d1ad63a4b /Python | |
parent | 0e3755e58a0495f835fc2eb89c7a72e87366346c (diff) | |
download | cpython-59488d233bb663af24492759fd0316ab499200d0.zip cpython-59488d233bb663af24492759fd0316ab499200d0.tar.gz cpython-59488d233bb663af24492759fd0316ab499200d0.tar.bz2 |
Closes #9254: backport __import__ docstring/doc mentions of importlib.
Patch by Éric Araujo.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/bltinmodule.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 373f870..3def080 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -53,8 +53,12 @@ builtin___import__(PyObject *self, PyObject *args, PyObject *kwds) PyDoc_STRVAR(import_doc, "__import__(name, globals={}, locals={}, fromlist=[], level=-1) -> module\n\ \n\ -Import a module. The globals are only used to determine the context;\n\ -they are not modified. The locals are currently unused. The fromlist\n\ +Import a module. Because this function is meant for use by the Python\n\ +interpreter and not for general use it is better to use\n\ +importlib.import_module() to programmatically import a module.\n\ +\n\ +The globals argument is only used to determine the context;\n\ +they are not modified. The locals argument is unused. The fromlist\n\ should be a list of names to emulate ``from name import ...'', or an\n\ empty list to emulate ``import name''.\n\ When importing a module from a package, note that __import__('A.B', ...)\n\ |