Skip to content

Are conditional type hints currently possible? #1251

Discussion options

You must be logged in to vote

No overload is only way today.

You need a type level map operation which has briefly appeared in typing sig and while useful would likely be a complex feature and definitely require a pep. I think numpy dtype conversion/promotion rules is best use case for this.

Replies: 1 comment

Comment options

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