Minor docs issue.

This commit is contained in:
Senthil Kumaran 2010-06-22 02:42:52 +00:00
parent b00697e67c
commit c5b81eebd8
1 changed files with 1 additions and 1 deletions

View File

@ -452,7 +452,7 @@ Additional Methods on Integer Types
Equivalent to:: Equivalent to::
def bit_length(self): 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 s = s.lstrip('-0b') # remove leading zeros and minus sign
return len(s) # len('100101') --> 6 return len(s) # len('100101') --> 6