◐ Shell
clean mode source ↗

Message 381141 - Python tracker

Well, it's certainly no bug fix, but just as PEP 585 lets us write list[int] instead of typing.List[int], it could be considered useful to be able to write callable[[int, int], str] instead of typing.Callable[[int, int], str].

It's easy enough to make it work so that callable(x) returns a bool but callable[X, Y] returns a built-in subclass of types.GenericAlias (the built-in type).

That said, I don't have data about how popular Callable is compared to other types (Sequence/Iterable etc. which will remain in collections.abc). Maybe someone can do some grepping of popular projects?