This PR adds a typing submodule to Midas with two functions cast and unsafe_cast. These functions should be used instead of cast from the stdlib typing module. unsafe_cast allows the user to tell the type checker the type of an expression without generating any runtime assertion. This can be useful when we want to avoid large amounts of computation at runtime, sacrificing a little safety for performance.
This PR adds a `typing` submodule to Midas with two functions `cast` and `unsafe_cast`. These functions should be used instead of `cast` from the stdlib `typing` module.
`unsafe_cast` allows the user to tell the type checker the type of an expression without generating any runtime assertion. This can be useful when we want to avoid large amounts of computation at runtime, sacrificing a little safety for performance.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR adds a
typingsubmodule to Midas with two functionscastandunsafe_cast. These functions should be used instead ofcastfrom the stdlibtypingmodule.unsafe_castallows the user to tell the type checker the type of an expression without generating any runtime assertion. This can be useful when we want to avoid large amounts of computation at runtime, sacrificing a little safety for performance.