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

Method open

Lib/importlib/resources/abc.py:136–143  ·  view source on GitHub ↗

mode may be 'r' or 'rb' to open as text or binary. Return a handle suitable for reading (same as pathlib.Path.open). When opening as text, accepts encoding parameters such as those accepted by io.TextIOWrapper.

(self, mode='r', *args, **kwargs)

Source from the content-addressed store, hash-verified

134
135 @abc.abstractmethod
136 def open(self, mode='r', *args, **kwargs):
137 """
138 mode may be 'r' or 'rb' to open as text or binary. Return a handle
139 suitable for reading (same as pathlib.Path.open).
140
141 When opening as text, accepts encoding parameters such as those
142 accepted by io.TextIOWrapper.
143 """
144
145 @property
146 @abc.abstractmethod

Callers 6

read_bytesMethod · 0.95
read_textMethod · 0.95
_write_atomicFunction · 0.45
open_binaryFunction · 0.45
open_textFunction · 0.45
open_resourceMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected