Message75771
[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) |
|
Date |
User |
Action |
Args |
2008-11-12 00:33:12 | vstinner | set | recipients:
+ vstinner, loewis, rhettinger, terry.reedy, mark.dickinson, fredrikj |
2008-11-12 00:33:11 | vstinner | link | issue3439 messages |
2008-11-12 00:33:10 | vstinner | create | |
|