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

Method read_text

Lib/importlib/resources/abc.py:85–90  ·  view source on GitHub ↗

Read contents of self as text

(self, encoding: Optional[str] = None)

Source from the content-addressed store, hash-verified

83 return strm.read()
84
85 def read_text(self, encoding: Optional[str] = None) -> str:
86 """
87 Read contents of self as text
88 """
89 with self.open(encoding=encoding) as strm:
90 return strm.read()
91
92 @abc.abstractmethod
93 def is_dir(self) -> bool:

Callers 1

read_textFunction · 0.45

Calls 2

openMethod · 0.95
readMethod · 0.45

Tested by

no test coverage detected