MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _get_spec

Function _get_spec

tools/python-3.11.9-amd64/Lib/pkgutil.py:26–37  ·  view source on GitHub ↗

Return the finder-specific module spec.

(finder, name)

Source from the content-addressed store, hash-verified

24
25
26def _get_spec(finder, name):
27 """Return the finder-specific module spec."""
28 # Works with legacy finders.
29 try:
30 find_spec = finder.find_spec
31 except AttributeError:
32 loader = finder.find_module(name)
33 if loader is None:
34 return None
35 return importlib.util.spec_from_loader(name, loader)
36 else:
37 return find_spec(name)
38
39
40def read_code(stream):

Callers 1

_get_delegateMethod · 0.85

Calls 2

find_specFunction · 0.50
find_moduleMethod · 0.45

Tested by

no test coverage detected