PEP Idea: Extend spec of Callable to accept unpacked TypeDicts to specify keyword-only parameters

I imagine the counterargument to a proposal like that is that it’s already possible to do that with Protocol

from typing import Protocol

class ExampleFuncType(Protocol):
    def __call__(self, a: int, b: int) -> bool: ...

I wonder if the combination of the PEP 695 type statement and the other additions (both those already added and open proposals) in the original post here (plus the additional 3 years since the swap to the PEG parser) is enough of a change in the time since the PEP 677 rejection to “tilt the odds”

1 Like