Docs: Move to method references for bytearray.take_bytes (#142053)

This commit is contained in:
Cody Maloney 2025-11-28 13:07:34 -08:00 committed by GitHub
parent fa9519f8b2
commit d2d2e92110
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 6 additions and 6 deletions

View file

@ -3240,7 +3240,7 @@ objects.
See the :ref:`What's New <whatsnew315-bytearray-take-bytes>` entry for
common code patterns which can be optimized with
:func:`bytearray.take_bytes`.
:meth:`bytearray.take_bytes`.
Since bytearray objects are sequences of integers (akin to a list), for a
bytearray object *b*, ``b[0]`` will be an integer, while ``b[0:1]`` will be

View file

@ -1451,7 +1451,7 @@ under no memory.
.. section: Core and Builtins
Update :class:`bytearray` to use a :class:`bytes` under the hood as its
buffer and add :func:`bytearray.take_bytes` to take it out.
buffer and add :meth:`bytearray.take_bytes` to take it out.
..

View file

@ -1,2 +1,2 @@
Update :ref:`asyncio-streams` to use :func:`bytearray.take_bytes` for a over
Update :ref:`asyncio-streams` to use :meth:`bytearray.take_bytes` for a over
10% performance improvement on pyperformance asyncio_tcp benchmark.

View file

@ -1,2 +1,2 @@
Remove a data copy from :func:`base64.b32decode` and
:func:`base64.b32encode` by using :func:`bytearray.take_bytes`.
:func:`base64.b32encode` by using :meth:`bytearray.take_bytes`.

View file

@ -1,2 +1,2 @@
Remove data copy from :func:`wave.Wave_read.readframes` and
:func:`wave.Wave_write.writeframes` by using :func:`bytearray.take_bytes`.
:func:`wave.Wave_write.writeframes` by using :meth:`bytearray.take_bytes`.

View file

@ -1,2 +1,2 @@
Remove data copy from :mod:`encodings.idna` :meth:`~codecs.Codec.encode` and
:meth:`~codecs.IncrementalEncoder.encode` by using :func:`bytearray.take_bytes`.
:meth:`~codecs.IncrementalEncoder.encode` by using :meth:`bytearray.take_bytes`.