function as parameter tpye hinting python

50

function as parameter tpye hinting python -

from typing import AnyStr, Callable

def my_function(name: AnyStr, func: Callable[[ParamType1, ParamType2, .., ParamTypeN], ReturnType]
) -> None:
	...

Comments

Submit
0 Comments