Skip to content

Commit 238fa69

Browse files
sobolevnencukou
andauthored
Apply suggestions from code review
Co-authored-by: Petr Viktorin <encukou@gmail.com>
1 parent 09557a7 commit 238fa69

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎Doc/c-api/dict.rst‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,12 @@ Dictionary objects
517517
Clears the input *dict* on success.
518518
Returns ``NULL`` with the exception set on error.
519519
520+
This function is intended for building a :class:`!frozendict` instance via
521+
a temporary *dict* that is not exposed to user code.
522+
To "freeze" an arbitrary dictionary, for example one received from the user
523+
as an argument, prefer :c:func:`PyFrozenDict_New` to leave the source
524+
intact.
525+
520526
.. impl-detail::
521527
522528
Works with O(1) complexity.

‎Doc/whatsnew/3.16.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,8 +1377,8 @@ C API changes
13771377
New features
13781378
------------
13791379

1380-
* Add a new way to efficitly create :class:`frozendict` instance
1381-
from existing :class:`dict` instances: :c:func:`PyDict_AsFrozenDictAndClear`.
1380+
* Add a new way to efficiently create a :class:`frozendict` instance by building
1381+
a :class:`dict` and "freezing" it: :c:func:`PyDict_AsFrozenDictAndClear`.
13821382
(Contributed by Nikita Sobolev in :gh:`153413`.)
13831383

13841384
* Add :c:func:`Py_HashBuffer` to the limited C API.

0 commit comments

Comments
 (0)