Skip to content

Commit 65eea41

Browse files
Update NEWS entries.
1 parent 738d0a5 commit 65eea41

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

Misc/NEWS.d/next/C API/2023-12-01-11-27-41.gh-issue-104231.yXgoYF.rst

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
:c:func:`PyObject_Str`, :c:func:`PyObject_Repr` and :c:func:`PyObject_ASCII`
2+
now always return an instance of :class:`str`, even if the special methods
3+
``__str__()`` or ``__repr__()`` return an instance of a subclass of
4+
:class:`!str`.
5+
:c:func:`PyObject_Bytes` now always returns an instance of :class:`bytes`, even
6+
if the special method ``__bytes__()`` returns an instance of a subclass of
7+
:class:`!bytes`.

Misc/NEWS.d/next/Core and Builtins/2023-12-01-11-25-17.gh-issue-104231.nGL6Xk.rst

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
:func:`str`, :func:`repr` and :func:`ascii` now always return an instance
2+
of :class:`str`, even if the special methods ``__str__()`` or ``__repr__()``
3+
return an instance of a subclass of :class:`!str`.
4+
:func:`bytes` now always returns an instance of :class:`bytes`, even
5+
if the special method ``__bytes__()`` returns an instance of a subclass of
6+
:class:`!bytes`.

0 commit comments

Comments
 (0)