Real Python1 min readintermediate
Quiz: Python 3.15 Preview: frozendict
Summary
This is an interactive quiz testing understanding of Python 3.15's new `frozendict` type. It covers how to build a frozen mapping, its hashability, and why it isn't a `dict` subclass.
- Python 3.15 introduces `frozendict` as an immutable dictionary counterpart.
- `frozendict` is not a subclass of `dict`.
- Instances of `frozendict` are hashable.
- The immutability of `frozendict` is shallow, not deep.
Python developers should care to understand upcoming core language features like `frozendict` to write more robust and efficient code.
3/10





