On Sun, Feb 14, 2021 at 11:49 AM Gregory P. Smith <g...@krypto.org> 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.  I'm +0.3 now.  Otherwise I elaborate on other guarding
> options and note a few additional Rejected/Postponed/Deferred Ideas
> sections that the PEP should mention as currently out of scope:
> Unconditional guards, multiple guarded parameters, and type mutators.
> Along the way I work my way towards suggestions for those, but I think they
> don't belong in _this_ PEP and could serve as input for future ones if/when
> desired.
>

Thanks for having an open mind. We should try to find a name that conveys
the boolean-ness to casual readers. But I note that "naming is hard" and
there are other aspects that already convey the boolean-ness (e.g. the
naming convention starting with 'is', and the presence of 'return True' in
the body :-), and I don't think that the proposed 'BoolTypeGuard' adds
readability.

-- 
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/J3DX2DACGA4YIXOKICO4IY5L6F36SAKT/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to