Closed LuxMiranda closed 2 years ago
It could support checking Callable
subscripts, but the input functions would have to have type hints.
def plusOne(n: int) -> int:
return n + 1
def addFrog(s: str) -> str:
return s + ' and frogs!'
That would make sense since the type hints are what differentiate each function. Would it also be possible to support things like generic types, the [...] thing, and custom TypeVars?
I really love the idea of just continually hacking Python into the purely functional language it was never meant to be :joy: Thank you for this library
Added support for Callable
in 5c9d985, and with Ellipsis
. TypeVar
is already supported.
@coady are you preparing a new release soon with this included? i need it for my library and while i can install multimethod
directly from the repo, it would be nice to have a version tag so i can put it in the requirements :)
Currently, the following does not run:
The expected output is:
The actual output is:
Is supporting function arguments with specific argument and return types like this even possible?