
Oct. 8, 2021
9:22 a.m.
07.10.21 19:41, S Pradeep Kumar пише:
1. Syntax to replace Callable
After a lot of discussion, there is strong consensus in typing-sig about adding syntax to replace Callable. So, the above example would be written as: ```python def print_purchases( user: User, formatter: (PurchaseRecord, List[AuthPermission]) -> FormattedItem, ) -> None:
<...> output = formatter(record, permissions) print(output) ```
How could you replace Callable[..., int] and Callable[Concatenate[str, P], int] ?