[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

Serhiy Storchaka report at bugs.python.org
Mon Dec 9 10:59:36 CET 2013


Serhiy Storchaka added the comment:

> For example, `i.bits_at(0, 52)` to get at a double's mantissa requires no thought at all to write or to read later; bit-level gibberish like

I agree that special function or method looks more clear. But I suppose that in many cases the performance does matter. And function call has larger overhead in current Python.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19915>
_______________________________________


More information about the Python-bugs-list mailing list