From 3cdb8d9e73582cc22a27b0d9da26054feb4ceec9 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 8 May 2024 22:01:17 +0300 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Jelle Zijlstra Co-authored-by: Alex Waygood --- Doc/c-api/object.rst | 2 +- Misc/NEWS.d/3.11.0b1.rst | 3 ++- Misc/NEWS.d/3.12.0a1.rst | 2 +- Misc/NEWS.d/3.13.0a1.rst | 3 ++- Misc/NEWS.d/3.13.0a2.rst | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst index 6a435fdc55e305..8eeac3fc8a1e58 100644 --- a/Doc/c-api/object.rst +++ b/Doc/c-api/object.rst @@ -65,7 +65,7 @@ Object Protocol Properly handle returning :c:data:`Py_NotImplemented` from within a C function (that is, create a new :term:`strong reference` - to ``NotImplemented`` and return it). + to :const:`NotImplemented` and return it). .. c:macro:: Py_PRINT_RAW diff --git a/Misc/NEWS.d/3.11.0b1.rst b/Misc/NEWS.d/3.11.0b1.rst index 64fa10a99fd542..c35e8e2c1caf07 100644 --- a/Misc/NEWS.d/3.11.0b1.rst +++ b/Misc/NEWS.d/3.11.0b1.rst @@ -664,7 +664,8 @@ for :func:`os.fcopyfile` available in macOs. .. nonce: l1p7CJ .. section: Library -For ``@dataclass``, add ``weakref_slot``. Default is ``False``. If true, and if +For :func:`@dataclass `, add *weakref_slot*. +The new parameter defaults to ``False``. If true, and if ``slots=True``, add a slot named ``"__weakref__"``, which will allow instances to be weakref'd. Contributed by Eric V. Smith diff --git a/Misc/NEWS.d/3.12.0a1.rst b/Misc/NEWS.d/3.12.0a1.rst index db4218e145d28f..f2438d6608b7af 100644 --- a/Misc/NEWS.d/3.12.0a1.rst +++ b/Misc/NEWS.d/3.12.0a1.rst @@ -3562,7 +3562,7 @@ with :func:`os.pidfd_open` in non-blocking mode. Patch by Kumar Aditya. .. section: Library Implement ``Enum.__contains__`` that returns ``True`` or ``False`` to replace the -deprecated behaviour that would sometimes raise a ``TypeError``. +deprecated behaviour that would sometimes raise a :exc:`TypeError`. .. diff --git a/Misc/NEWS.d/3.13.0a1.rst b/Misc/NEWS.d/3.13.0a1.rst index 57dab812b359ec..0092db29460c37 100644 --- a/Misc/NEWS.d/3.13.0a1.rst +++ b/Misc/NEWS.d/3.13.0a1.rst @@ -3436,7 +3436,8 @@ added support for this decorator. Patch by Alex Waygood. .. nonce: C1ahtk .. section: Library -Make :func:`pydoc.doc` catch bad module ``ImportError`` when output stream is not ``None``. +Make :func:`pydoc.doc` catch bad module :exc:`ImportError` +when output stream is not ``None``. .. diff --git a/Misc/NEWS.d/3.13.0a2.rst b/Misc/NEWS.d/3.13.0a2.rst index 63e185d2f109e3..2480ee8202d0f4 100644 --- a/Misc/NEWS.d/3.13.0a2.rst +++ b/Misc/NEWS.d/3.13.0a2.rst @@ -1355,7 +1355,7 @@ crash encountered after the first :meth:`tkinter.Tk` instance is destroyed. Add docstrings to the IDLE debugger module. Fix two bugs: initialize ``Idb.botframe`` (should be in Bdb); in ``Idb.in_rpc_code``, check whether -``prev_frame is None`` before trying to use it. Greatly expand test_debugger. +``prev_frame`` is ``None`` before trying to use it. Greatly expand test_debugger. ..