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

Function read_text

Lib/importlib/resources/_functional.py:28–32  ·  view source on GitHub ↗

Read and return contents of *resource* within *package* as str.

(anchor, *path_names, encoding=_MISSING, errors='strict')

Source from the content-addressed store, hash-verified

26
27
28def read_text(anchor, *path_names, encoding=_MISSING, errors='strict'):
29 """Read and return contents of *resource* within *package* as str."""
30 encoding = _get_encoding_arg(path_names, encoding)
31 resource = _get_resource(anchor, path_names)
32 return resource.read_text(encoding=encoding, errors=errors)
33
34
35def path(anchor, *path_names):

Callers

nothing calls this directly

Calls 3

_get_encoding_argFunction · 0.85
_get_resourceFunction · 0.85
read_textMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…