Skip to content
masterclass Buddy

Python · Class

memoryview

memoryview exposes an object's buffer data without copying it. It supports indexing, slicing, and, for writable buffers, compatible assignments.

Last updated

Syntax

memoryview(object)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • bytes
  • bytearray
  • memoryview.hex()
  • memoryview.tolist()
  • memoryview.tobytes()
  • memoryview.release()
  • Buffer Protocol

Source: Built-in Types — Python 3.15.2 documentation. Checked 2026-11-03.