You can read the PEP at: PEP 814 – Add frozendict built-in type.
Abstract
A new public immutable type frozendict is added to the builtins module.
We expect frozendict to be safe by design, as it prevents any unintended modifications. This addition benefits not only CPython’s standard library, but also third-party maintainers who can take advantage of a reliable, immutable dictionary type.
frozendictis not adictsubclass, but inherits directly fromobject.- The insertion order is preserved.
- A
frozendictcan be hashed withhash(frozendict)if all keys and values can be hashed. Pseudo-code:hash(frozenset(frozendict.items())).
PEP 814 lists relations and differences with (old) PEP 416 (frozendict) and PEP 603 (collections.frozenmap). PEP 603 was not submitted to the Steering Council yet. While PEP 416 used sandboxing as a motivation, PEP 814 is more focused on concurrency (asyncio, concurrent.interpreters, free threading).
Donghee & Victor