Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions peps/pep-0814.rst
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ Possible candidates for ``frozendict`` in the stdlib
We have identified several stdlib modules where adopting ``frozendict``
can enhance safety and prevent unintended modifications by design. We
also believe that there are additional potential use cases beyond the
ones listed below.
ones listed below. However, this does not mean that we intend to make
these changes without the approval of the respective module maintainers.

Note: it remains possible to bind again a variable to a new modified
``frozendict`` or a new mutable ``dict``.
Expand Down Expand Up @@ -362,15 +363,9 @@ Reference Implementation
Thread Safety
=============

Once the ``frozendict`` is created, it is immutable and can be shared
safely between threads without any synchronization.


Future Work
===========

We are also going to make ``frozendict`` to be more efficient in terms
of memory usage and performance compared to ``dict`` in future.
Once a ``frozendict`` is created, its shallow immutability is guaranteed.
This means it can be safely shared between threads without synchronization,
as long as its values are not modified by other threads.


Rejected Ideas
Expand Down
Loading