Mercurial > cpython-lru_cache-weakref
diff Lib/importlib/_bootstrap.py @ 52002:76a579b6bade
Rename importlib.util.set___package__ to set_package.
| author | Brett Cannon <bcannon@gmail.com> |
|---|---|
| date | Wed, 04 Mar 2009 16:07:00 +0000 |
| parents | e37bb30255f3 |
| children | 2033d45a5b99 |
line wrap: on
line diff
--- a/Lib/importlib/_bootstrap.py Wed Mar 04 11:18:52 2009 +0000 +++ b/Lib/importlib/_bootstrap.py Wed Mar 04 16:07:00 2009 +0000 @@ -97,7 +97,7 @@ new.__dict__.update(old.__dict__) -def set___package__(fxn): +def set_package(fxn): """Set __package__ on the returned module.""" def wrapper(*args, **kwargs): module = fxn(*args, **kwargs) @@ -131,7 +131,7 @@ return cls if imp.is_builtin(fullname) else None @classmethod - @set___package__ + @set_package def load_module(cls, fullname): """Load a built-in module.""" if fullname not in sys.builtin_module_names: @@ -160,7 +160,7 @@ return cls if imp.is_frozen(fullname) else None @classmethod - @set___package__ + @set_package def load_module(cls, fullname): """Load a frozen module.""" if cls.find_module(fullname) is None: @@ -248,7 +248,7 @@ raise ValueError("extension modules cannot be packages") @check_name - @set___package__ + @set_package def load_module(self, fullname): """Load an extension module.""" is_reload = fullname in sys.modules
