Samuel Colvin

Results 1016 comments of Samuel Colvin

to be clear, this doesn't really have anything to do with discriminated unions, except that I guess `validate` will take a bunch of kwargs, including `discriminator` like `Field`.

Thanks so much @philhchen for digging into this. These seem like really insightful questions. > 1. `from_attributes` Good point, I guess we'll need to change the behaviour of the tagged...

All the user errors use dashes https://github.com/pydantic/pydantic/blob/34a1c02277140551e6c90dd7241ceb0c1b638353/pydantic/errors.py#L26-L30 It's ValidationErrors that use underscores, maybe we should be consistent?

Two sets of errors need documenting: * "User errors" errors that can happen when a developer uses pydantic wrongly, that's the ones with codes listen in `errors.py` - link above...

exactly, currently this library doesn't know how to pretty print them I think.

Yes I think so, would love to review a PR.

#71 is a better discussion of these issues.

JSON is often used for things like collecting exception data or more generally to record the state of a/the system for inspection later. In situations like that you really want...