summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/buffer.rst
diff options
context:
space:
mode:
authorChris Jerdonek <chris.jerdonek@gmail.com>2012-11-21 01:45:51 (GMT)
committerChris Jerdonek <chris.jerdonek@gmail.com>2012-11-21 01:45:51 (GMT)
commit5fae0e58549c9270b188a1591ffa6cc4c2d9ab4e (patch)
tree5e955cf6e54ee57cf3531687ddf4c01681c34786 /Doc/c-api/buffer.rst
parent9ddfb19e4197be4abc0b74236f207a3efc853c04 (diff)
downloadcpython-5fae0e58549c9270b188a1591ffa6cc4c2d9ab4e.zip
cpython-5fae0e58549c9270b188a1591ffa6cc4c2d9ab4e.tar.gz
cpython-5fae0e58549c9270b188a1591ffa6cc4c2d9ab4e.tar.bz2
Improve str() and object.__str__() documentation (issue #13538).
Diffstat (limited to 'Doc/c-api/buffer.rst')
-rw-r--r--Doc/c-api/buffer.rst12
1 files changed, 7 insertions, 5 deletions
diff --git a/Doc/c-api/buffer.rst b/Doc/c-api/buffer.rst
index d636935..0b521df 100644
--- a/Doc/c-api/buffer.rst
+++ b/Doc/c-api/buffer.rst
@@ -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