mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
Add a link to buffer protocol in bytearray() doc (GH-22675)
(cherry picked from commit 0f25c231b3
)
Co-authored-by: Antoine <43954001+awecx@users.noreply.github.com>
This commit is contained in:
parent
36cb0c88cf
commit
df4790c071
1 changed files with 2 additions and 2 deletions
|
@ -150,8 +150,8 @@ are always available. They are listed here in alphabetical order.
|
|||
* If it is an *integer*, the array will have that size and will be
|
||||
initialized with null bytes.
|
||||
|
||||
* If it is an object conforming to the *buffer* interface, a read-only buffer
|
||||
of the object will be used to initialize the bytes array.
|
||||
* If it is an object conforming to the :ref:`buffer interface <bufferobjects>`,
|
||||
a read-only buffer of the object will be used to initialize the bytes array.
|
||||
|
||||
* If it is an *iterable*, it must be an iterable of integers in the range
|
||||
``0 <= x < 256``, which are used as the initial contents of the array.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue