Re:Python 3 Types in the Wild
by roywiggins on Friday March 18, 2022 @01:21PM
(#30724932)
The types are usually ignored, but not entirely erased- Pydantic uses type hints to do validation at runtime, so if you construct a Pydantic object with invalid data it will throw an error, so eg
Will try and validate a json request against the implied schema provided by the type hints on PydanticFoo while constructing it and will throw if it fails.
[ Parent
| on HN ]
There are no comments on this comment yet.