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
.. 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.
..
-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.
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`.
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`.
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`.