How can I specify one type for all of these callables:
a(str)
b(str, str)
c(str, str, str)
d(str, str, str, str
I found that I can specify Callable[..., None]
in general way but how to specify with details that all arguments will be str without doing ugly syntax Union[Callable[[str], None], Callable[[str, str], None, __more_like_this__]
. Is it other method to do it? Can I do it with use typing?
a
, for example, does not belong to the type of functions that can take 1-4str
arguments; it belongs to the type of functions that accepts exactly one argument.)t3
that you think should be considered).str
arguments, or any number ofstr
arguments?