#pyconus - Pydantic and the `match` statement
speaker - what will this do?
audience: mumble
speaker - right!
I'm getting annoyed.
Scenario: What if we had a stream of dicts (a discriminated union) with a union with Any....
Option 1- if/elif on the discriminator field
Option 2- Add a `match` statement that won't be recognized by subsequent maintainers of the code base.♡ 0 ↻ 0TypeAdapter an undefined concept.
♡ 0 ↻ 0"Type adapters provide a flexible way to perform validation and serialization based on a Python type." ah, yes. Flexible.
♡ 0 ↻ 0Here is the official tutorial
♡ 1 ↻ 0