[Python-Dev] Re: RFC on Callable Type Syntax

2021年10月08日 02:25:22 -0700

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] ?
_______________________________________________
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/BJHVYIMVXYRGRTR77TNX77HEQKPZ2A4Y/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to