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

Method __buffer__

Lib/test/test_io/test_memoryio.py:592–594  ·  view source on GitHub ↗
(self, flags)

Source from the content-addressed store, hash-verified

590 def test_write_concurrent_close(self):
591 class B:
592 def __buffer__(self, flags):
593 memio.close()
594 return memoryview(b"A")
595
596 memio = self.ioclass()
597 self.assertRaises(ValueError, memio.write, B())

Callers

nothing calls this directly

Calls 2

closeMethod · 0.45
getbufferMethod · 0.45

Tested by

no test coverage detected