diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2008-12-19 17:46:51 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2008-12-19 17:46:51 (GMT) |
commit | 4b3ed5d8ba16d0884cffb3e23341155ce5667c9e (patch) | |
tree | 6c2c393aece52d167648927cc695d127e5bbb676 /Doc | |
parent | ba666a59db2e90fec979e40789d70ba774f38ab6 (diff) | |
download | cpython-4b3ed5d8ba16d0884cffb3e23341155ce5667c9e.zip cpython-4b3ed5d8ba16d0884cffb3e23341155ce5667c9e.tar.gz cpython-4b3ed5d8ba16d0884cffb3e23341155ce5667c9e.tar.bz2 |
Fix typo in Python equivalent for bit_length.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/stdtypes.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 1dde919..3dc8618 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 |