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

STINNER Victor report at bugs.python.org
Tue Nov 11 19:15:43 CET 2008


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

> (-maxint-1).numbits() hangs

Ooops, nice catch! It was an integer overflow, already present in 
fredrikj's original patch. The new patch fixes this bug but also 
included a documentation patch ;-)

Added file: http://bugs.python.org/file11988/numbits-3.patch

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


More information about the Python-bugs-list mailing list