Surely there already is a built in for that, not quite as short as “All” but 
shorter than “typing.Any”: “object”. Avoids keyword pollution, already has 
clear meaning. And it works with isinstance! :-) 

 

Is there something I’m missing? I never saw the point of typing.Any.

 

From: Abdulla Al Kathiri <[email protected]> 
Sent: 15 August 2021 19:29
To: Joren Hammudoglu <[email protected]>
Cc: [email protected]
Subject: [Python-ideas] Re: PEP idea

 

+1 I like it, anything to get rid of Optional[type] is good.

If we can replace Callable[[type1], type2] with (type1) -> type2 and typing.Any 
with just soft keyword “All”, type annotations will be fun! 

Sent from my iPhone





On 15 Aug 2021, at 8:41 PM, Joren Hammudoglu <[email protected] 
<mailto:[email protected]> > wrote:



See https://www.python.org/dev/peps/pep-0645/

_______________________________________________
Python-ideas mailing list -- [email protected] 
<mailto:[email protected]> 
To unsubscribe send an email to [email protected] 
<mailto:[email protected]> 
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/UYSUJOZOWOYQ26CI5EXLZNAXUU3AUYON/
Code of Conduct: http://python.org/psf/codeofconduct/

_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/KWBJIEZ3TKGWBYCR2W2P6FVD5ZVI7O35/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to