[issue3439] create a numbits() method for int and long types

Fredrik Johansson report at bugs.python.org
Sat Dec 13 17:44:32 CET 2008


Fredrik Johansson <fredrik.johansson at gmail.com> added the comment:

FYI, Brent & Zimmermann call this function nbits(n) in "Modern Computer
Arithmetic": http://www.loria.fr/~zimmerma/mca/pub226.html

I don't really care much about the name though.

In the documentation, should "same value as ``x.bit_length``" not be
"same value as ``x.bit_length()``"?

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


More information about the Python-bugs-list mailing list