mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
Improve str() and object.__str__() documentation (issue #13538).
This commit is contained in:
parent
39bdad813a
commit
17fc44c9b3
7 changed files with 96 additions and 44 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue