We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bcdf231 commit 656abe3Copy full SHA for 656abe3
1 file changed
Doc/whatsnew/3.15.rst
@@ -221,6 +221,11 @@ The following standard library modules have been updated to accept
221
:func:`eval` and :func:`exec` accept :class:`!frozendict` for *globals*, and
222
:func:`type` and :meth:`str.maketrans` accept :class:`!frozendict` for *dict*.
223
224
+Code checking for :class:`dict` type using ``isinstance(arg, dict)`` can be
225
+updated to ``isinstance(arg, (dict, frozendict))`` to accept also the
226
+:class:`!frozendict` type, or to ``isinstance(arg, collections.abc.Mapping)``
227
+to accept also other mapping types such as :class:`~types.MappingProxyType`.
228
+
229
.. seealso:: :pep:`814` for the full specification and rationale.
230
231
(Contributed by Victor Stinner and Donghee Na in :gh:`141510`.)
0 commit comments