summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-09-10 21:47:03 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-09-10 21:47:03 (GMT)
commit5e19e4441335a70c9087402e9c487b66c9daca94 (patch)
tree9d0dd68e8b105696f64cd56453a1cce957bdb6e3 /Doc
parent2409dc79d2df77d75d702ec7feeeacc3c44490d2 (diff)
downloadcpython-5e19e4441335a70c9087402e9c487b66c9daca94.zip
cpython-5e19e4441335a70c9087402e9c487b66c9daca94.tar.gz
cpython-5e19e4441335a70c9087402e9c487b66c9daca94.tar.bz2
kill memoryview.size in favor of len(view)
Reviewer: Antoine Pitrou #3827
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/stdtypes.rst6
1 files changed, 2 insertions, 4 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index ea00a43..e8dbc2d 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -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