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.

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?
History
Date User Action Args
2008-11-11 23:00:17mark.dickinsonsetrecipients: + mark.dickinson, loewis, rhettinger, terry.reedy, vstinner, fredrikj
2008-11-11 23:00:17mark.dickinsonsetmessageid: <1226444417.18.0.329650799396.issue3439@psf.upfronthosting.co.za>
2008-11-11 23:00:13mark.dickinsonlinkissue3439 messages
2008-11-11 23:00:12mark.dickinsoncreate