This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 fredrikj
收信人 fredrikj, loewis, mark.dickinson, pitrou, rhettinger, terry.reedy, vstinner
日期 2008-12-16.14:11:05
SpamBayes Score 0.0006448789
Marked as misclassified
Message-id <1229436666.56.0.0404393463889.issue3439@psf.upfronthosting.co.za>
In-reply-to
内容
When did the name change back to numbits? Anyway, I think this reference
implementation is better:

def numbits(x):
    x = abs(x)
    n = 0
    while x:
        n += 1
        x //= 2
    return n

(//= 2 could be changed to >>= 1)
历史
日期 用户 动作 参数
2008-12-16 14:11:06fredrikj修改recipients: + fredrikj, loewis, rhettinger, terry.reedy, mark.dickinson, pitrou, vstinner
2008-12-16 14:11:06fredrikj修改messageid: <1229436666.56.0.0404393463889.issue3439@psf.upfronthosting.co.za>
2008-12-16 14:11:06fredrikj链接issue3439 messages
2008-12-16 14:11:05fredrikj创建