https://github.com/python/cpython/commit/d2d2e92110751fff3cbb2ce26355af292dbcdcf6
commit: d2d2e92110751fff3cbb2ce26355af292dbcdcf6
branch: main
author: Cody Maloney <[email protected]>
committer: picnixz <[email protected]>
date: 2025-11-28T22:07:34+01:00
summary:
Docs: Move to method references for bytearray.take_bytes (#142053)
files:
M Doc/library/stdtypes.rst
M Misc/NEWS.d/3.15.0a2.rst
M Misc/NEWS.d/next/Library/2025-11-22-16-33-48.gh-issue-141863.4PLhnv.rst
M Misc/NEWS.d/next/Library/2025-11-25-22-54-07.gh-issue-141968.vg3AMJ.rst
M Misc/NEWS.d/next/Library/2025-11-25-23-22-46.gh-issue-141968.R1sHnJ.rst
M Misc/NEWS.d/next/Library/2025-11-25-23-35-07.gh-issue-141968.b3Gscp.rst
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index a87898dadf4af6..8b896011734df5 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -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
diff --git a/Misc/NEWS.d/3.15.0a2.rst b/Misc/NEWS.d/3.15.0a2.rst
index ba439d49517add..4e3a62b0f4a7d2 100644
--- a/Misc/NEWS.d/3.15.0a2.rst
+++ b/Misc/NEWS.d/3.15.0a2.rst
@@ -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.
..
diff --git
a/Misc/NEWS.d/next/Library/2025-11-22-16-33-48.gh-issue-141863.4PLhnv.rst
b/Misc/NEWS.d/next/Library/2025-11-22-16-33-48.gh-issue-141863.4PLhnv.rst
index 910ab98c950f9e..585774ba2cb66b 100644
--- a/Misc/NEWS.d/next/Library/2025-11-22-16-33-48.gh-issue-141863.4PLhnv.rst
+++ b/Misc/NEWS.d/next/Library/2025-11-22-16-33-48.gh-issue-141863.4PLhnv.rst
@@ -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.
diff --git
a/Misc/NEWS.d/next/Library/2025-11-25-22-54-07.gh-issue-141968.vg3AMJ.rst
b/Misc/NEWS.d/next/Library/2025-11-25-22-54-07.gh-issue-141968.vg3AMJ.rst
index 8492cb35d5bc76..4c89902813f6a6 100644
--- a/Misc/NEWS.d/next/Library/2025-11-25-22-54-07.gh-issue-141968.vg3AMJ.rst
+++ b/Misc/NEWS.d/next/Library/2025-11-25-22-54-07.gh-issue-141968.vg3AMJ.rst
@@ -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`.
diff --git
a/Misc/NEWS.d/next/Library/2025-11-25-23-22-46.gh-issue-141968.R1sHnJ.rst
b/Misc/NEWS.d/next/Library/2025-11-25-23-22-46.gh-issue-141968.R1sHnJ.rst
index 16b9ad78c3cd3f..eca0ac4c8e6014 100644
--- a/Misc/NEWS.d/next/Library/2025-11-25-23-22-46.gh-issue-141968.R1sHnJ.rst
+++ b/Misc/NEWS.d/next/Library/2025-11-25-23-22-46.gh-issue-141968.R1sHnJ.rst
@@ -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`.
diff --git
a/Misc/NEWS.d/next/Library/2025-11-25-23-35-07.gh-issue-141968.b3Gscp.rst
b/Misc/NEWS.d/next/Library/2025-11-25-23-35-07.gh-issue-141968.b3Gscp.rst
index 32658be5b2f632..50124e8b19609f 100644
--- a/Misc/NEWS.d/next/Library/2025-11-25-23-35-07.gh-issue-141968.b3Gscp.rst
+++ b/Misc/NEWS.d/next/Library/2025-11-25-23-35-07.gh-issue-141968.b3Gscp.rst
@@ -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`.
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]