summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2008-12-19 17:46:51 +0000
committerMark Dickinson <dickinsm@gmail.com>2008-12-19 17:46:51 +0000
commit4b3ed5d8ba16d0884cffb3e23341155ce5667c9e (patch)
tree6c2c393aece52d167648927cc695d127e5bbb676
parentba666a59db2e90fec979e40789d70ba774f38ab6 (diff)
downloadcpython-git-4b3ed5d8ba16d0884cffb3e23341155ce5667c9e.tar.gz
Fix typo in Python equivalent for bit_length.
-rw-r--r--Doc/library/stdtypes.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 1dde919c0c..3dc8618bbd 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -471,7 +471,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