Sylvain Marie <sylvain.ma...@schneider-electric.com> added the comment:

Mark
I get your point.

Mine is just to have a common abstraction between python's primitive bool and 
numpy bool (and possibly other future alternate booleans) for consistency with 
`numbers` and to be used in common type hints (PEP484). 

If I get you correctly, then the minimal `Boolean` ABC would only need to 
contain the `__bool__` method, without the bitwise operations. That's perfectly 
fine, as long as it correctly describes the minimal boolean logic (truth value 
for `if`/..., and `and`/`or`/`not`) and is compliant both with python and numpy 
bool.

A separate ABC for bitwise operations is then indeed a good idea to open in a 
separate thread. Finding a good name will be tough here though... 
`BitwiseOperable` ? `BitsContainer` ? ...  :)
Regards

-Sylvain

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32886>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to