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

Method __init__

tools/python-3.11.9-amd64/Lib/_pyio.py:1249–1258  ·  view source on GitHub ↗
(self, raw, buffer_size=DEFAULT_BUFFER_SIZE)

Source from the content-addressed store, hash-verified

1247 """
1248
1249 def __init__(self, raw, buffer_size=DEFAULT_BUFFER_SIZE):
1250 if not raw.writable():
1251 raise OSError('"raw" argument must be writable.')
1252
1253 _BufferedIOMixin.__init__(self, raw)
1254 if buffer_size <= 0:
1255 raise ValueError("invalid buffer size")
1256 self.buffer_size = buffer_size
1257 self._write_buf = bytearray()
1258 self._write_lock = Lock()
1259
1260 def writable(self):
1261 return self.raw.writable()

Callers

nothing calls this directly

Calls 3

LockClass · 0.50
writableMethod · 0.45
__init__Method · 0.45

Tested by

no test coverage detected