top | item 42870555 (no title) StackTopherFlow | 1 year ago Have you tried beartype? It's worked well for me and has the least overhead of any other runtime type checker.https://github.com/beartype/beartype discuss order hn newest N1H1L|1 year ago I think TypeGuard (https://github.com/agronholm/typeguard) also does runtime type checking. I use beartype BTW. westurner|1 year ago pycontracts: https://github.com/AlexandruBurlacu/pycontractsicontract: https://github.com/Parquery/icontractThe DbC Design-by-Contract patterns supported by icontract probably have code quality returns beyond saving work.Safety critical coding guidelines specify that there must be runtime type and value checks at the top of every function. drcongo|1 year ago I use TypeGuard too, but only in local dev and pytest runs. I find it really useful so I'm now intrigued to try Beartype too. I found the readme on GitHub confusing at a glance though, I need decorators to type check something?
N1H1L|1 year ago I think TypeGuard (https://github.com/agronholm/typeguard) also does runtime type checking. I use beartype BTW. westurner|1 year ago pycontracts: https://github.com/AlexandruBurlacu/pycontractsicontract: https://github.com/Parquery/icontractThe DbC Design-by-Contract patterns supported by icontract probably have code quality returns beyond saving work.Safety critical coding guidelines specify that there must be runtime type and value checks at the top of every function. drcongo|1 year ago I use TypeGuard too, but only in local dev and pytest runs. I find it really useful so I'm now intrigued to try Beartype too. I found the readme on GitHub confusing at a glance though, I need decorators to type check something?
westurner|1 year ago pycontracts: https://github.com/AlexandruBurlacu/pycontractsicontract: https://github.com/Parquery/icontractThe DbC Design-by-Contract patterns supported by icontract probably have code quality returns beyond saving work.Safety critical coding guidelines specify that there must be runtime type and value checks at the top of every function.
drcongo|1 year ago I use TypeGuard too, but only in local dev and pytest runs. I find it really useful so I'm now intrigued to try Beartype too. I found the readme on GitHub confusing at a glance though, I need decorators to type check something?
N1H1L|1 year ago
westurner|1 year ago
icontract: https://github.com/Parquery/icontract
The DbC Design-by-Contract patterns supported by icontract probably have code quality returns beyond saving work.
Safety critical coding guidelines specify that there must be runtime type and value checks at the top of every function.
drcongo|1 year ago