#so something close to real would look like an unsolved type inference problem with half a dozen type variables
Explore tagged Tumblr posts
Text
I mean it's not really (float, float) → float, is it?
It's something like...
forall a. (HasLAdd a, HasRAdd a, HasMul a, HasPow a, HasSub a) => a -> a -> a
#I think were it float and were mypy running it would object!#oh also that's still a fake signature#iirc + * ** etc are not required to take or return the same type#so something close to real would look like an unsolved type inference problem with half a dozen type variables#abusing computers for fun and profit#⊤#<- is I think my type theory tag#.....I wonder if there _is_ a way to write down this signature in mypy. methods can be somewhat-assumed to be known at typechecking time...
501 notes
·
View notes