Author haypo
Recipients fredrikj, haypo, loewis, mark.dickinson, rhettinger, terry.reedy
Date 2008-11-12.00:33:10
SpamBayes Score 1.96414e-07
Marked as misclassified No
Message-id <200811120132.19260.victor.stinner@haypocalc.com>
In-reply-to <1226444417.18.0.329650799396.issue3439@psf.upfronthosting.co.za>
Content
[Mark Dickinson]
> (1) the number of bits should be computed first directly using ...

_PyLong_NumBits() : done. But the result type is always long.

> (2) Just as a matter of style, I think "if (x == NULL)" is preferable

done

> (4) I quite like the idea of having numbits be a property rather than a
> method---might still be worth considering?

I agree, so in the new patch, numbits is now a property.

[Fredrik Johansson]
> In stdtypes.rst, x.numbits should be listed in the table under
> "Bit-string Operations on Integer Types"

done

--

10
>>> x=1023L; x.numbits
10L
>>> x=2**(2**10); n=x.numbits; n, n.numbits
(1025L, 11L)
Files
File name Uploaded
numbits-4.patch haypo, 2008-11-12.00:33:09
History
Date User Action Args
2008-11-12 00:33:12hayposetrecipients: + haypo, loewis, rhettinger, terry.reedy, mark.dickinson, fredrikj
2008-11-12 00:33:11haypolinkissue3439 messages
2008-11-12 00:33:10haypocreate