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 rhettinger
Recipients fredrikj, loewis, rhettinger
Date 2008-07-25.00:11:02
SpamBayes Score 0.016492376
Marked as misclassified No
Message-id <>
numbers.Integral is already way too fat of an API.  Am -1 on expanding 
it further.  Recommend sticking with the simplest, least invasive, 
least pervasive version of your request, a numbits() method for ints.

FWIW, in Py2.6 you can already write:

  def numbits(x):
      return len(bin(abs(x))) - 2
Date User Action Args
2008-07-25 00:11:08rhettingersetspambayes_score: 0.0164924 -> 0.016492376
recipients: + rhettinger, loewis, fredrikj
2008-07-25 00:11:07rhettingersetspambayes_score: 0.0164924 -> 0.0164924
messageid: <>
2008-07-25 00:11:05rhettingerlinkissue3439 messages
2008-07-25 00:11:04rhettingercreate