# PEP 814: Add frozendict built-in type

**URL:** <https://discuss.python.org/t/pep-814-add-frozendict-built-in-type/104854>\
**Category:** PEPs\
**Tags:** builtins\
**Created:** [November 13, 2025, 9:53am UTC](https://discuss.python.org/t/pep-814-add-frozendict-built-in-type/104854 "2025-11-13T09:53:50Z")\
**Posts on this page:** 1\
**Showing post:** 47

<div class="post-metadata">

**Author:** ![brettcannon](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/brettcannon/32/34895_2.png) [@brettcannon](https://discuss.python.org/u/brettcannon)\
**Post date:** [November 14, 2025, 10:01pm UTC](https://discuss.python.org/t/pep-814-add-frozendict-built-in-type/104854/47 "2025-11-14T22:01:34Z")

</div>

> [@dmoisset](#):
>
> It’s as dangerous as `dict.clear()` or `dict.update()`

… and …

> [@pgdr](#):
>
> Sharing a pointer to a mutable object means unexpected side-effects at a distance are to be expected—so to speak. You can argue exactly the same with `dict`: suddenly the `dict` is empty and the key you just verified was there, is there no more.

It’s one thing for keys to disappear from underneath you, but have an object change its type is something else entirely. If you were mutating a list and it suddenly became a tuple in the middle of a function call would you be surprised by that? And don’t forget that `dict` and `frozendict` don’t meet until `object`, so your guards in your code about expecting a dict at the top of your function suddenly turned into a lie.

Remember, this is a built-in type that’s being proposed. That means it will be affecting general Python practices. If we let dicts suddenly change their type in place to become a `frozendict` we then start encouraging swapping out an object’s type much more often than it is now (which I would argue is extremely rare, and for good reasons). I don’t think these sorts of tricks should be encouraged just to make creating a `frozendict` instance a bit cheaper.

To be a bit blunt: if there’s a way to make a `dict` instance a `frozendict` instance in-place via a method on the object I am -1 on the PEP.

---

_[View the full topic](https://discuss.python.org/t/pep-814-add-frozendict-built-in-type/104854)._
