Skip to content

Glossary: Software Design Patterns

Frozen dataclass

Also written: frozen=True

A dataclass made with `@dataclass(frozen=True)`, whose fields can't change after creation. Assigning to one raises `FrozenInstanceError`, so you use `replace` to get a changed copy.

Where the book teaches it

Related terms

@dataclassCopying templates (copy.deepcopy, dataclasses.replace)