<snip>
# Questions
In my limited exploration above, I did not find callables that were given `Callable[..., Any]` for the lack of things like named parameters, default values, or `*args: int`. This suggests that the shorthand syntax `(int, bool) -> str` might cover almost all of our use cases. [2]
+ Do we have real-world examples where a Callable type was given `Callable[..., Any]` because it could not be expressed with positional-only parameters or ParamSpec or TypeVarTuple?
+ Do we have real-world examples of untyped Python code where a callable is called with named parameters? This is the remaining category (3) where features beyond shorthand syntax might potentially be useful.
Given that overloads are unlikely to be represented in our callable syntax, as David pointed out, we can't hope to capture all function types. We will have to draw the line somewhere. Is it worth the extra complexity to include things like named parameters?
Thanks, this is great data to have for discussion!
More complicated callable types are currently often expressed using callback protocols. For example, I found this one in `stdlib/tkinter/__init__.pyi`:
class _ExceptionReportingCallback(Protocol):
def __call__(self, __exc: Type[BaseException], __val: BaseException, __tb: TracebackType) -> Any: ...
This could be expressed with Callable but the names provide better documentation.
def __call__(self, block: bool = ..., timeout: Optional[float] = ...) -> bool: ...