Serhiy Storchaka added the comment: > Extracting sign, exponent and significand fields from the binary > representation of a float is at least one thing I'd use this for.
You don't need special function for bit operations. Float values are short (32 or 64 bits) and any bit operations are O(1). Special function for bit extracting (or modifying) is needed when you process many hundreds or thousands of bits. In any case >> and & for 64-bit values are faster than method call. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19915> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com