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

Method __init__

Lib/_pyio.py:1224–1233  ·  view source on GitHub ↗
(self, raw, buffer_size=DEFAULT_BUFFER_SIZE)

Source from the content-addressed store, hash-verified

1222 """
1223
1224 def __init__(self, raw, buffer_size=DEFAULT_BUFFER_SIZE):
1225 if not raw.writable():
1226 raise OSError('"raw" argument must be writable.')
1227
1228 _BufferedIOMixin.__init__(self, raw)
1229 if buffer_size <= 0:
1230 raise ValueError("invalid buffer size")
1231 self.buffer_size = buffer_size
1232 self._write_buf = bytearray()
1233 self._write_lock = Lock()
1234
1235 def writable(self):
1236 return self.raw.writable()

Callers

nothing calls this directly

Calls 3

LockClass · 0.90
writableMethod · 0.45
__init__Method · 0.45

Tested by

no test coverage detected