On 2/14/21 2:34 PM, Guido van Rossum wrote:
On Sun, Feb 14, 2021 at 12:51 PM David Mertz <[email protected]
<mailto:[email protected]>> wrote:
On Sun, Feb 14, 2021, 2:53 PM Gregory P. Smith <[email protected]
<mailto:[email protected]>> wrote:
*TL;DR of my TL;DR* - Not conveying bool-ness directly in the
return annotation is my only complaint. A BoolTypeGuard
spelling would alleviate that.
This is exactly my feeling as well. In fact, I do not understand
why it cannot simply be a parameterized Bool. That would avoid all
confusion. Yes, it's not the technical jargon type system
designers use... But the existing proposal moves all the mental
effort to non-experts who may never use type checking tools.
But note that 'bool' in Python is not subclassable.
No, but this hypothetical 'Bool'--presumably added to typing.py--might
well be.
Cheers,
//arry/
_______________________________________________
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/5OVN7MIXJZZE6C6PSA3UQSLQJRM26NQ4/
Code of Conduct: http://python.org/psf/codeofconduct/