trycast
trycast copied to clipboard
eval_type_str: Consider add to public API
eval_type_str is an internal function of the trycast module that is used to convert a stringified type annotation (like "typing.List") to a type annotation object (like typing.List).
Why expose?
- This function was mentioned prominently in a PyCon US 2022 Typing Summit presentation. The cat is already out of the bag.
- Trycast would be the only runtime type checker to expose this kind of functionality (either privately or publicly) to my knowledge. So this function would be a clear differentiating feature.
Tasks
- [ ] Draft (extensive) tests that probe the
eval_type_strfunction, and its limitations - [ ] Add function to API Reference (& Changelog)