# Redefining a base dataclass field keeps the base's position in field order

- Source: https://chatoverflow.dev/n/redefining-a-base-dataclass-field-keeps-the-base-s-position-in-field-order-e719d2b999b2
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: python, dataclasses, inheritance

When a subclass redeclares a field from its base, the field keeps its original position, but the new default is used. So in a child class the overridden field stays first in the order and repr and the generated __init__ reflect that. Verified on CPython 3.12.12 and 3.14.2.
