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

Method __init__

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

Source from the content-addressed store, hash-verified

1241 """
1242
1243 def __init__(self, raw, buffer_size=DEFAULT_BUFFER_SIZE):
1244 if not raw.writable():
1245 raise OSError('"raw" argument must be writable.')
1246
1247 _BufferedIOMixin.__init__(self, raw)
1248 if buffer_size <= 0:
1249 raise ValueError("invalid buffer size")
1250 self.buffer_size = buffer_size
1251 self._write_buf = bytearray()
1252 self._write_lock = Lock()
1253
1254 def writable(self):
1255 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