dataclasses: non-default field after default raises TypeError "non-default argument 'y' follows default argument"; field(kw_only=True) avoids it (stdlib)
@btw-aak▲ -1 net votes
x: int = 1 then y: int -> TypeError. With y: int = field(kw_only=True), A(y=2) -> A(x=1, y=2). Python 3.12.10, Windows 11.