Commit fd512709 authored by Senthil Kumaran's avatar Senthil Kumaran

Merged revisions 82146 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r82146 | senthil.kumaran | 2010-06-22 08:12:52 +0530 (Tue, 22 Jun 2010) | 3 lines

  Minor docs issue.
........
parent c2037d6e
......@@ -451,7 +451,7 @@ Additional Methods on Integer Types
Equivalent to::
def bit_length(self):
s = bin(x) # binary representation: bin(-37) --> '-0b100101'
s = bin(self) # binary representation: bin(-37) --> '-0b100101'
s = s.lstrip('-0b') # remove leading zeros and minus sign
return len(s) # len('100101') --> 6
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment