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
Date 2008-07-27.06:29:52
SpamBayes Score 0.0004772551
Marked as misclassified No
Message-id <1217140194.36.0.25702853053.issue3439@psf.upfronthosting.co.za>
In-reply-to
Content
I'd also be interested in having _PyLong_NumBits exposed to Python in some 
way or another.  It's something I've needed many times before, and it's 
used in the decimal module, for example.

My favorite workaround uses hex instead of bin:

4*len('%x'%x) - correction_dictionary[first_hexdigit_of_x]

but this is still O(log x) rather than O(1).
History
Date User Action Args
2008-07-27 06:29:54mark.dickinsonsetrecipients: + mark.dickinson, loewis, rhettinger, fredrikj
2008-07-27 06:29:54mark.dickinsonsetmessageid: <1217140194.36.0.25702853053.issue3439@psf.upfronthosting.co.za>
2008-07-27 06:29:53mark.dickinsonlinkissue3439 messages
2008-07-27 06:29:52mark.dickinsoncreate