mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
Document both importlib.machinery.BuiltinImporter and FrozenImporter.
This commit is contained in:
parent
51d4aabf09
commit
78246b6b45
3 changed files with 49 additions and 9 deletions
|
@ -110,8 +110,8 @@ class BuiltinImporter:
|
|||
return None
|
||||
return cls if imp.is_builtin(fullname) else None
|
||||
|
||||
@staticmethod
|
||||
def load_module(fullname):
|
||||
@classmethod
|
||||
def load_module(cls, fullname):
|
||||
"""Load a built-in module."""
|
||||
if fullname not in sys.builtin_module_names:
|
||||
raise ImportError("{0} is not a built-in module".format(fullname))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue