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

Function _new_buffersize

Lib/_pyio.py:1467–1475  ·  view source on GitHub ↗
(bytes_read)

Source from the content-addressed store, hash-verified

1465
1466
1467def _new_buffersize(bytes_read):
1468 # Parallels _io/fileio.c new_buffersize
1469 if bytes_read > 65536:
1470 addend = bytes_read >> 3
1471 else:
1472 addend = 256 + bytes_read
1473 if addend < DEFAULT_BUFFER_SIZE:
1474 addend = DEFAULT_BUFFER_SIZE
1475 return bytes_read + addend
1476
1477
1478class FileIO(RawIOBase):

Callers 1

readallMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected