This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients ncoghlan, pitrou, pmoody, serhiy.storchaka
Date 2014-05-14.10:17:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1400062637.65.0.872332297511.issue21487@psf.upfronthosting.co.za>
In-reply-to
Content
Alternative implementations of _count_righthand_zero_bits():

def _count_righthand_zero_bits(number, bits):
    if not number:
        return bits
    return (~number & (number-1)).bit_length()

or

def _count_righthand_zero_bits(number, bits):
    if not number:
        return bits
    return (~(number | -number)).bit_length()
History
Date User Action Args
2014-05-14 10:17:17serhiy.storchakasetrecipients: + serhiy.storchaka, ncoghlan, pitrou, pmoody
2014-05-14 10:17:17serhiy.storchakasetmessageid: <1400062637.65.0.872332297511.issue21487@psf.upfronthosting.co.za>
2014-05-14 10:17:17serhiy.storchakalinkissue21487 messages
2014-05-14 10:17:17serhiy.storchakacreate