> On Nov 29, 2020, at 3:46 AM, Guido van Rossum <gu...@python.org> wrote: > > You could parenthesize the return value if you think it's not clear
Yeah I agree. Parenthesizing the return should be optional because if we require it, the callable arguments with parenthesized returns and the parenthesized return of the return itself would look too much. Optional Return Parenthesis: ((int, str) -> int, (…) -> str) -> ((str) -> int) VS. Required Return Parenthesis: ((int, str) -> (int), (…) -> (str)) -> ((str) -> (int)) …. Consistent but too many parenthesis > Indeed. Shantanu did some quick counting and found that after 'Any' and the > types covered by PEP 585, Callable is by far the most used: > https://bugs.python.org/issue42102#msg381155 > <https://bugs.python.org/issue42102#msg381155> Nice survey. Can we do something with “Any" once we are at it? Maybe we use “?”. But that might confuse people and think it’s None mirroring PEP 645’s “type?”.
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/BD3OGA5WB53K3DI2C2XKRGEO2ASWM3GU/ Code of Conduct: http://python.org/psf/codeofconduct/