diff options
author | Brett Cannon <bcannon@gmail.com> | 2009-03-15 00:00:19 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2009-03-15 00:00:19 (GMT) |
commit | 0e0d8a63b15b83942dba2ef1ddc33fa2f4534e21 (patch) | |
tree | f7a09d9aea04410611e0704ee37fcbd6ecff6166 /Lib | |
parent | 22b1331930cc02e54b2456f220f9d48e62dedd52 (diff) | |
download | cpython-0e0d8a63b15b83942dba2ef1ddc33fa2f4534e21.zip cpython-0e0d8a63b15b83942dba2ef1ddc33fa2f4534e21.tar.gz cpython-0e0d8a63b15b83942dba2ef1ddc33fa2f4534e21.tar.bz2 |
Clean up docstring from importlib.util.module_for_loader.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/importlib/_bootstrap.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py index 5e9e16e..cae12ed 100644 --- a/Lib/importlib/_bootstrap.py +++ b/Lib/importlib/_bootstrap.py @@ -128,14 +128,14 @@ def set_loader(fxn): def module_for_loader(fxn): """Decorator to handle selecting the proper module for loaders. - Decorated modules are passed the module to use instead of the module name. - The module is either from sys.modules if it already exists (for reloading) - or is a new module which has __name__ set. If any exception is raised by - the decorated method and the decorator added a module to sys.modules, then - the module is deleted from sys.modules. - - The decorator assumes that the decorated method takes self/cls as a first - argument and the module as the second argument. + The decorated function is passed the module to use instead of the module + name. The module passed in to the function is either from sys.modules if + it already exists or is a new module which has __name__ set and is inserted + into sys.modules. If an exception is raised and the decorator created the + module it is subsequently removed from sys.modules. + + The decorator assumes that the decorated function takes the module name as + the second argument. """ def decorated(self, fullname): |