Improve str() and object.__str__() documentation (issue #13538).

This commit is contained in:
Chris Jerdonek 2012-11-20 17:31:02 -08:00
parent 39bdad813a
commit 17fc44c9b3
7 changed files with 96 additions and 44 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
@ -9,9 +14,6 @@ Buffer Protocol
.. sectionauthor:: Benjamin Peterson
.. 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`.
@ -23,8 +25,8 @@ characteristic of being backed by a possibly large memory buffer. It is
then desireable, 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