On Mon, Jun 22, 2020 at 10:19 AM Serhiy Storchaka <storch...@gmail.com>
wrote:

> The abstract class for booleans is useless, because all objects can be
> used in boolean context, and all boolean operations (and, or, not) work
> with arbitrary objects. So Boolean would be identical to objects.
>

I'm highly ambivalent about Python's model of "Truthiness" -- it's really
convenient often, but also gives me a lack of control.

So I think it would be helpful, in static type checking cases in particular
to say something HAS to be a Bool, and only a Bool.

And in that context, I don't think I'd want allow integers. Also, in the
reverse, I would wan't folks to be able to use Bools when an integer or
other number is expected.

So in short: no, Bool should not be considered a Numeric "type"

-CHB



> _______________________________________________
> 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/RUQBDQJGDQ5MQBIWEVNULIMMB3EHOJVP/
> Code of Conduct: http://python.org/psf/codeofconduct/
>


-- 
Christopher Barker, PhD

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython
_______________________________________________
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/DBMZTOHIYCM5AJOTZMSVANQM4VKCTBVH/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to