Author mark.dickinson
Recipients Jim Fasarakis-Hilliard, casevh, gbtami, mark.dickinson, niklasf, njs, rhettinger, serhiy.storchaka, tim.peters, vstinner
Date 2020-05-25.15:04:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1590419088.21.0.423627566953.issue29882@roundup.psfhosted.org>
In-reply-to
Content
> 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. :-)
History
Date User Action Args
2020-05-25 15:04:48mark.dickinsonsetrecipients: + mark.dickinson, tim.peters, rhettinger, vstinner, casevh, njs, serhiy.storchaka, Jim Fasarakis-Hilliard, niklasf, gbtami
2020-05-25 15:04:48mark.dickinsonsetmessageid: <1590419088.21.0.423627566953.issue29882@roundup.psfhosted.org>
2020-05-25 15:04:48mark.dickinsonlinkissue29882 messages
2020-05-25 15:04:48mark.dickinsoncreate