Skip to content

Commit 37e421b

Browse files
vstinnerhugovkStanFromIreland
authored
gh-141510: Complete What's New in Python 3.15 for frozendict (#145537)
Mention updated stdlib modules and built-in functions. Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
1 parent 0c29f83 commit 37e421b

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

Doc/library/functions.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2099,6 +2099,10 @@ are always available. They are listed here in alphabetical order.
20992099
Subclasses of :class:`!type` which don't override ``type.__new__`` may no
21002100
longer use the one-argument form to get the type of an object.
21012101

2102+
.. versionchanged:: next
2103+
2104+
*dict* can now be a :class:`frozendict`.
2105+
21022106
.. function:: vars()
21032107
vars(object, /)
21042108

Doc/library/stdtypes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2385,6 +2385,10 @@ expression support in the :mod:`re` module).
23852385
the same position in *to*. If there is a third argument, it must be a string,
23862386
whose characters will be mapped to ``None`` in the result.
23872387

2388+
.. versionchanged:: next
2389+
2390+
*dict* can now be a :class:`frozendict`.
2391+
23882392

23892393
.. method:: str.partition(sep, /)
23902394

Doc/whatsnew/3.15.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,13 @@ For example::
211211
>>> a == b
212212
True
213213

214+
The following standard library modules have been updated to accept
215+
:class:`!frozendict`: :mod:`copy`, :mod:`decimal`, :mod:`json`, :mod:`marshal`,
216+
:mod:`pickle`, :mod:`pprint` and :mod:`xml.etree.ElementTree`.
217+
218+
:func:`eval` and :func:`exec` accept :class:`!frozendict` for *globals*, and
219+
:func:`type` and :meth:`str.maketrans` accept :class:`!frozendict` for *dict*.
220+
214221
.. seealso:: :pep:`814` for the full specification and rationale.
215222

216223
(Contributed by Victor Stinner and Donghee Na in :gh:`141510`.)

0 commit comments

Comments
 (0)