Sylvain Marie <sylvain.ma...@schneider-electric.com> added the comment:
Thanks ! 1. > ok 2. > ok 3. > That's simply 'the latest state' in the discussion. I guess that having Boolean in numbers is better than it being in its own module, since it is consistent with the other ABCs (and bool is a subclass of both Boolean and Integral-er). To quote Guido's answer in the discussion thread GVR> A thought just occurred to me. Maybe we should just add a Boolean class to numbers? (several positive answers) SMA > I would rather suggest to keep that Boolean ABC class independent of Integral (see proposal in first post) to let it remain 'pure', i.e. represent logical booleans only. However nothing prevents us to register python bool as a virtual subclass of *both* Integral and Boolean - while np.bool would be registered as a virtual subclass of Boolean only. This would reflect quite well the reality - the fact that python bool is both a Boolean and an Integer, while numpy bool is only a Boolean. GVR> OK, that could work. At this point I think you should just file an issue on bugs.python.org (but since Python 3.7 is in feature freeze, expect this to be put on the 3.8 track). 4. > Very good point. I do not know how do handle this at this point. As long as bool is a subclass of int (changing this is another discussion), the only way to go for now is probably to remove the 'invert' method from this ABC - if I am interpreting your answer correctly? Finally let's note that the Integral > Integer renaming is now handled in a separate thread https://bugs.python.org/issue32891 ---------- _______________________________________ 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