Skip to content
Discussion options

You must be logged in to vote

Type inference. Yes. So much yes! Full-blown type inference support in @beartype would be delightful. Someone make a @beartype-based runtime equivalent of the mypy-specific reveal_type() fake function happen. I revel in this idea.

reveal_type() tends to be rather useless in practice. mypy is just a static type-checker. mypy doesn't actually run at runtime and thus generally no idea what it's talking about. The set of all type hints that static type-checkers like mypy and pyright can correctly infer is a lot smaller than the set of all type hints that runtime type-checkers like @beartype and typeguard can correctly infer – in theory, anyway.

I dimly recall @wesselb the Wise needing somethi…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@Moosems
Comment options

@leycec
Comment options

@wesselb
Comment options

@leycec
Comment options

Answer selected by Moosems
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants