Is it possible using Python 3 syntax for declaring input parameters and return value types determine those types? Similarly to determining the number of parameters of a func
inspect can be used:
inspect
>>> def foo(name: str) -> int: ... return 0 >>> >>> import inspect >>> >>> sig = inspect.signature(foo) >>> [p.annotation for p in sig.parameters.values()] [] >>> sig.return_annotation
@vaultah's method looks even more convenient, though.