Message 77911 - Python tracker (original) (raw)
Message77911
Author | fredrikj |
---|---|
Recipients | fredrikj, loewis, mark.dickinson, pitrou, rhettinger, terry.reedy, vstinner |
Date | 2008-12-16.14:11:05 |
SpamBayes Score | 0.0006448789 |
Marked as misclassified | No |
Message-id | 1229436666.56.0.0404393463889.issue3439@psf.upfronthosting.co.za |
In-reply-to |
Content |
---|
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) |
History | |||
---|---|---|---|
Date | User | Action | Args |
2008-12-16 14:11:06 | fredrikj | set | recipients: + fredrikj, loewis, rhettinger, terry.reedy, mark.dickinson, pitrou, vstinner |
2008-12-16 14:11:06 | fredrikj | set | messageid: 1229436666.56.0.0404393463889.issue3439@psf.upfronthosting.co.za |
2008-12-16 14:11:06 | fredrikj | link | issue3439 messages |
2008-12-16 14:11:05 | fredrikj | create |