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

STINNER Victor report at bugs.python.org
Fri Dec 12 17:56:34 CET 2008


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

> I'll work on the documentation

Ok, cool.

> a description of the semantics of numbits for 0 and negative 
integers

About the negative integer: the documentation should be "number of 
bits of the *absolute value* of x" and "by convention, 0.numbits() is 
0". But you're right, the documentation is not clear.

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


More information about the Python-bugs-list mailing list