消息 [77911]
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:06 | fredrikj | 修改 | recipients:
+ fredrikj, loewis, rhettinger, terry.reedy, mark.dickinson, pitrou, vstinner |
| 2008-12-16 14:11:06 | fredrikj | 修改 | messageid: <1229436666.56.0.0404393463889.issue3439@psf.upfronthosting.co.za> |
| 2008-12-16 14:11:06 | fredrikj | 链接 | issue3439 messages |
| 2008-12-16 14:11:05 | fredrikj | 创建 | |
|