Message312499
@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 |
|
Date |
User |
Action |
Args |
2018-02-21 18:05:47 | smarie | set | recipients:
+ smarie, mark.dickinson, serhiy.storchaka, josh.r |
2018-02-21 18:05:47 | smarie | set | messageid: <1519236347.59.0.467229070634.issue32886@psf.upfronthosting.co.za> |
2018-02-21 18:05:47 | smarie | link | issue32886 messages |
2018-02-21 18:05:47 | smarie | create | |
|