]> granicus.if.org Git - python/commitdiff
Minor docs issue.
authorSenthil Kumaran <orsenthil@gmail.com>
Tue, 22 Jun 2010 02:42:52 +0000 (02:42 +0000)
committerSenthil Kumaran <orsenthil@gmail.com>
Tue, 22 Jun 2010 02:42:52 +0000 (02:42 +0000)
Doc/library/stdtypes.rst

index b07c7f8b53de96ee665f32d06af6467173da30b6..ad00c9a24d8c87e142a135503723d9d0aabf6062 100644 (file)
@@ -452,7 +452,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