Mark Dickinson <[EMAIL PROTECTED]> added the comment: 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). ---------- nosy: +marketdickinson _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3439> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com