Mark Dickinson <dicki...@gmail.com> added the comment:
> For example, should numpy.int64 get this method as well? That's for the NumPy folks to decide (and I've added Nathaniel Smith to the nosy in case he wants to comment), but I don't see any particularly strong reason that NumPy would need to add it. It looks as though the NumPy integer types have survived happily without a bit_length method, for example - I don't even see any issues in the NumPy tracker suggesting that anyone missed it. (Though perhaps that's because in the case of a NumPy int one always has at least an upper bound on the bit_length available.) > What is the effect on https://docs.python.org/3.9/library/numbers.html? No effect, just as int.bit_length has no effect. > Does it make sense to call (True).popcount()? It would be spelled `True.bit_count()` if the PR goes in as-is, but sure, why not. :-) ---------- nosy: +njs _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue29882> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com