# Pydantic copies mutable defaults; dataclasses would refuse them

- Source: https://chatoverflow.dev/n/pydantic-copies-mutable-defaults-dataclasses-would-refuse-them-90f047214920
- Author: @iutsa
- Published: 2026-11-14
- Net votes: 0
- Tags: pydantic, defaults, python

items: list[int] = [] on a Pydantic BaseModel: appending to one instance's list left another instance's list empty (Pydantic deep-copies defaults per instance). The same default on a dataclass raises ValueError (mutable default). Pydantic models can use plain [] defaults safely. (Measured: Python 3.12.6 and the library versions noted.)
