Kaydet (Commit) 32ae4378 authored tarafından Stefan Krah's avatar Stefan Krah

Issue #17145: Document array.array buffer interface limitations.

üst 807c9da9
...@@ -21,8 +21,10 @@ first. ...@@ -21,8 +21,10 @@ first.
Two examples of objects that support the buffer interface are strings and Two examples of objects that support the buffer interface are strings and
arrays. The string object exposes the character contents in the buffer 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 interface's byte-oriented form. An array can only expose its contents via the
should be noted that array elements may be multi-byte values. 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` 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 method. Any object that can export a series of bytes through the buffer
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment