Merge from 3.3: Improve str() and object.__str__() docs (issue #13538).

This commit is contained in:
Chris Jerdonek 2012-11-20 17:53:17 -08:00
commit d675a2c48a
7 changed files with 100 additions and 49 deletions

View file

@ -1,5 +1,10 @@
.. highlightlang:: c
.. index::
single: buffer protocol
single: buffer interface; (see buffer protocol)
single: buffer object; (see buffer protocol)
.. _bufferobjects:
Buffer Protocol
@ -10,9 +15,6 @@ Buffer Protocol
.. sectionauthor:: Stefan Krah
.. index::
single: buffer interface
Certain objects available in Python wrap access to an underlying memory
array or *buffer*. Such objects include the built-in :class:`bytes` and
:class:`bytearray`, and some extension types like :class:`array.array`.
@ -24,8 +26,8 @@ characteristic of being backed by a possibly large memory buffer. It is
then desirable, in some situations, to access that buffer directly and
without intermediate copying.
Python provides such a facility at the C level in the form of the *buffer
protocol*. This protocol has two sides:
Python provides such a facility at the C level in the form of the :ref:`buffer
protocol <bufferobjects>`. This protocol has two sides:
.. index:: single: PyBufferProcs