Mercurial > cpython-lru_cache-weakref
diff Python/bltinmodule.c @ 78173:751f28564a45 2.7
Closes #9254: backport __import__ docstring/doc mentions of importlib.
Patch by Éric Araujo.
| author | R David Murray <rdmurray@bitdance.com> |
|---|---|
| date | Wed, 18 Jul 2012 19:44:08 -0400 |
| parents | d7aff4423172 |
| children | ba1c48f8b571 |
line wrap: on
line diff
--- a/Python/bltinmodule.c Wed Jul 18 17:48:34 2012 -0500 +++ b/Python/bltinmodule.c Wed Jul 18 19:44:08 2012 -0400 @@ -53,8 +53,12 @@ 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\
