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

Method __write

Lib/tarfile.py:451–458  ·  view source on GitHub ↗

Write string s to the stream if a whole new block is ready to be written.

(self, s)

Source from the content-addressed store, hash-verified

449 self.__write(s)
450
451 def __write(self, s):
452 """Write string s to the stream if a whole new block
453 is ready to be written.
454 """
455 self.buf += s
456 while len(self.buf) > self.bufsize:
457 self.fileobj.write(self.buf[:self.bufsize])
458 self.buf = self.buf[self.bufsize:]
459
460 def close(self):
461 """Close the _Stream object. No operation should be

Callers 2

_init_write_gzMethod · 0.95
writeMethod · 0.95

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected