MCPcopy Index your code
hub / github.com/RustPython/RustPython / is_package

Method is_package

Lib/importlib/_bootstrap_external.py:1065–1069  ·  view source on GitHub ↗

Return True if the extension module is a package.

(self, fullname)

Source from the content-addressed store, hash-verified

1063 self.name, self.path)
1064
1065 def is_package(self, fullname):
1066 """Return True if the extension module is a package."""
1067 file_name = _path_split(self.path)[1]
1068 return any(file_name == '__init__' + suffix
1069 for suffix in EXTENSION_SUFFIXES)
1070
1071 def get_code(self, fullname):
1072 """Return None as an extension module cannot create a code object."""

Callers

nothing calls this directly

Calls 2

_path_splitFunction · 0.70
anyFunction · 0.50

Tested by

no test coverage detected