summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
diff options
context:
space:
mode:
authorChris Jerdonek <chris.jerdonek@gmail.com>2012-11-21 01:31:02 (GMT)
committerChris Jerdonek <chris.jerdonek@gmail.com>2012-11-21 01:31:02 (GMT)
commit17fc44c9b3040538839f63d344b98ad5a904d520 (patch)
treeae2aa634c7133227e622996c010be273cce7fbe5 /Doc/c-api
parent39bdad813a2f07bd8c373e2c88b76467ef12832c (diff)
downloadcpython-17fc44c9b3040538839f63d344b98ad5a904d520.zip
cpython-17fc44c9b3040538839f63d344b98ad5a904d520.tar.gz
cpython-17fc44c9b3040538839f63d344b98ad5a904d520.tar.bz2
Improve str() and object.__str__() documentation (issue #13538).
Diffstat (limited to 'Doc/c-api')
-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 d98ece3..740b575 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
@@ -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