If I have the following:
def alert(self, text: str, color: str) -> str:
Can I get somehow the specified type of my arguments?
I tried using func.__code__.co_varnames
& inspect.getargspec(func)
without good results.
The alert.__annotations__
has a dict with the types.
The key return
describes the return value. All other keys are the names of the arguments.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments