mirror of
https://github.com/python/cpython.git
synced 2025-07-15 23:35:23 +00:00
[issue19951] Fix docstring and use of _get_suppported_file_loaders() to reflect 2-tuples.
This commit is contained in:
parent
0e61ed8400
commit
e8bbfebee0
3 changed files with 1936 additions and 1935 deletions
|
@ -881,7 +881,7 @@ class WindowsRegistryFinder:
|
|||
_os.stat(filepath)
|
||||
except OSError:
|
||||
return None
|
||||
for loader, suffixes, _ in _get_supported_file_loaders():
|
||||
for loader, suffixes in _get_supported_file_loaders():
|
||||
if filepath.endswith(tuple(suffixes)):
|
||||
return loader(fullname, filepath)
|
||||
|
||||
|
@ -1670,7 +1670,7 @@ def _calc___package__(globals):
|
|||
def _get_supported_file_loaders():
|
||||
"""Returns a list of file-based module loaders.
|
||||
|
||||
Each item is a tuple (loader, suffixes, allow_packages).
|
||||
Each item is a tuple (loader, suffixes).
|
||||
"""
|
||||
extensions = ExtensionFileLoader, _imp.extension_suffixes()
|
||||
source = SourceFileLoader, SOURCE_SUFFIXES
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue