Message381141
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? |
|
Date |
User |
Action |
Args |
2020-11-16 18:48:47 | gvanrossum | set | recipients:
+ gvanrossum, serhiy.storchaka, levkivskyi, BTaskaya, hauntsaninja, kj |
2020-11-16 18:48:47 | gvanrossum | set | messageid: <1605552527.07.0.29669793647.issue42102@roundup.psfhosted.org> |
2020-11-16 18:48:47 | gvanrossum | link | issue42102 messages |
2020-11-16 18:48:47 | gvanrossum | create | |
|