From: Stefan Krah Date: Sat, 26 Apr 2014 20:50:25 +0000 (+0200) Subject: Issue #17145: Document array.array buffer interface limitations. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=32ae4378b945b55d482539f83fdd0aeac8b6f375;p=python Issue #17145: Document array.array buffer interface limitations. --- diff --git a/Doc/c-api/buffer.rst b/Doc/c-api/buffer.rst index e028369c50..74693ac584 100644 --- a/Doc/c-api/buffer.rst +++ b/Doc/c-api/buffer.rst @@ -21,8 +21,10 @@ first. 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