Message75767
| Author |
mark.dickinson |
| Recipients |
fredrikj, loewis, mark.dickinson, rhettinger, terry.reedy, vstinner |
| Date |
2008年11月11日.23:00:12 |
| SpamBayes Score |
1.1706703e-08 |
| Marked as misclassified |
No |
| Message-id |
<1226444417.18.0.329650799396.issue3439@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The latest patch from Victor looks good. A few comments:
(1) the number of bits should be computed first directly using C
arithmetic, and only recomputed using PyLong arithmetic if the C
computations overflow. For one thing, overflow is going to be very rare
in practice; for another, in the sort of applications that use
.numbits(), speed of numbits() is often critical.
(2) Just as a matter of style, I think "if (x == NULL)" is preferable
to "if (!x)". At any rate, the former style is much more common in
Python source.
(3) the reference counting all looks good.
(4) I quite like the idea of having numbits be a property rather than a
method---might still be worth considering? |
|