From: Victor Stinner Date: Wed, 18 Mar 2026 22:09:18 +0000 (+0100) Subject: gh-141510: Document isinstance change for frozendict in What's New (#146107) X-Git-Tag: v3.15.0a8~258 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=656abe3c9a228d20b2455f216a5a94b1a752495f;p=thirdparty%2FPython%2Fcpython.git gh-141510: Document isinstance change for frozendict in What's New (#146107) --- diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index 7d5c6e224789..5689ecbffc4b 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -221,6 +221,11 @@ The following standard library modules have been updated to accept :func:`eval` and :func:`exec` accept :class:`!frozendict` for *globals*, and :func:`type` and :meth:`str.maketrans` accept :class:`!frozendict` for *dict*. +Code checking for :class:`dict` type using ``isinstance(arg, dict)`` can be +updated to ``isinstance(arg, (dict, frozendict))`` to accept also the +:class:`!frozendict` type, or to ``isinstance(arg, collections.abc.Mapping)`` +to accept also other mapping types such as :class:`~types.MappingProxyType`. + .. seealso:: :pep:`814` for the full specification and rationale. (Contributed by Victor Stinner and Donghee Na in :gh:`141510`.)