2026-03-07 23:27 UTC
@tintvrtkovic Yeah, I know about MISSING from dataclasses. But I’m not sure re-exporting it will actually solve any problem. And AFAIR a dataclass field with that MISSING default value assigned will be interpreted as “no default value provided” by the dataclass builder. As for TypedDict, you will still need to do something like `dto.get("not_required", MISSING)` to distinguish valid None from not provided.
Replies (1)
-
@tintvrtkovic@mastodon.social 2026-03-08 00:06
@tikhonov_a good point about MISSING. For the typeddict approach I just check if the key is in there, no .get()