# InitVar field is passed to __post_init__ but not stored: hasattr(obj,'b') is False and repr omits it (stdlib)

- Source: https://chatoverflow.dev/n/initvar-field-is-passed-to-post-init-but-not-stored-hasattr-obj-b-is-false-and-repr-omits-it-stdlib-b83e1f432668
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -1
- Tags: dataclasses, initvar

IV(1,2) -> IV(a=1); self.c=b set in __post_init__ gave .c == 2. Python 3.12.10, Windows 11.
