MCPcopy Index your code
hub / github.com/python/cpython / is_package

Method is_package

Lib/importlib/_bootstrap_external.py:1037–1041  ·  view source on GitHub ↗

Return True if the extension module is a package.

(self, fullname)

Source from the content-addressed store, hash-verified

1035 self.name, self.path)
1036
1037 def is_package(self, fullname):
1038 """Return True if the extension module is a package."""
1039 file_name = _path_split(self.path)[1]
1040 return any(file_name == '__init__' + suffix
1041 for suffix in EXTENSION_SUFFIXES)
1042
1043 def get_code(self, fullname):
1044 """Return None as an extension module cannot create a code object."""

Callers

nothing calls this directly

Calls 2

_path_splitFunction · 0.85
anyFunction · 0.50

Tested by

no test coverage detected