mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
kill memoryview.size in favor of len(view)
Reviewer: Antoine Pitrou #3827
This commit is contained in:
parent
2409dc79d2
commit
5e19e44413
4 changed files with 5 additions and 12 deletions
|
|
@ -2246,6 +2246,8 @@ simple bytes or complex data structures.
|
|||
buffer protocol. Builtin objects that support the buffer protocol include
|
||||
:class:`bytes` and :class:`bytearray`.
|
||||
|
||||
``len(view)`` returns the total number of bytes in the memoryview, *view*.
|
||||
|
||||
A :class:`memoryview` supports slicing to expose its data. Taking a single
|
||||
index will return a single byte. Full slicing will result in a subview::
|
||||
|
||||
|
|
@ -2322,10 +2324,6 @@ simple bytes or complex data structures.
|
|||
A tuple of integers the length of :attr:`ndim` giving the size in bytes to
|
||||
access each element for each dimension of the array.
|
||||
|
||||
.. attribute:: size
|
||||
|
||||
The number of bytes in the buffer. Also available as ``len(view)``.
|
||||
|
||||
.. memoryview.suboffsets isn't documented because it only seems useful for C
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue