Ive been using trycast
for a while for runtime type checking (mostly yaml
/json
-> TypedDict
) and its working great (thanks)
Mostly i use a pattern of checking if something is assignable and raising a TypeCastingError
with the failing value to allow handling further up the stack
What would be really helpful is to be able to expose why the object is not assignable (eg "incorrect key", "incorrect type for key", "missing key" etc)
i guess there is some complexity around issues with different types of Type
implementing this might also add some complexity around continuing after the first failure and collecting the errors etc
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4