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

@Mark: you are right. That's why the proposed ABC does NOT inherit from 
Integral/Integer and focuses on boolean logic in its simplest form (not, and, 
or, xor). This one is common to both python bool and np.bool_.

@Serhiy: thanks for this interesting suggestion ! However having been in the 
software development world for 12 years, I never met these concepts in practice 
yet. I suspect that therefore I will not be the only one - I'm afraid that 
might make this ABC hard to understand. Besides, I am not sure that numpy bool 
and python bool implement this correctly:

>>> True > False
True
>>> np.bool_(True) > np.bool_(False)
True

This does not seem to comply with the description I found in 
https://en.wikipedia.org/wiki/Material_conditional

For these reasons I would suggest these operations to be part of a separate 
class.

-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