[Python-checkins] cpython (2.7): Issue #17145: Document array.array buffer interface limitations.
stefan.krah
python-checkins at python.org
Sat Apr 26 22:51:09 CEST 2014
http://hg.python.org/cpython/rev/0a2ac61729d2
changeset: 90466:0a2ac61729d2
branch: 2.7
user: Stefan Krah <skrah at bytereef.org>
date: Sat Apr 26 22:50:25 2014 +0200
summary:
Issue #17145: Document array.array buffer interface limitations.
files:
Doc/c-api/buffer.rst | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Doc/c-api/buffer.rst b/Doc/c-api/buffer.rst
--- a/Doc/c-api/buffer.rst
+++ b/Doc/c-api/buffer.rst
@@ -21,8 +21,10 @@
Two examples of objects that support the buffer interface are strings and
arrays. The string object exposes the character contents in the buffer
-interface's byte-oriented form. An array can also expose its contents, but it
-should be noted that array elements may be multi-byte values.
+interface's byte-oriented form. An array can only expose its contents via the
+old-style buffer interface. This limitation does not apply to Python 3,
+where :class:`memoryview` objects can be constructed from arrays, too.
+Array elements may be multi-byte values.
An example user of the buffer interface is the file object's :meth:`write`
method. Any object that can export a series of bytes through the buffer
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list