[Python-checkins] r67858 - in python/branches/py3k: Doc/library/stdtypes.rst
mark.dickinson
python-checkins at python.org
Fri Dec 19 18:48:51 CET 2008
Author: mark.dickinson
Date: Fri Dec 19 18:48:51 2008
New Revision: 67858
Log:
Merged revisions 67857 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r67857 | mark.dickinson | 2008年12月19日 17:46:51 +0000 (2008年12月19日) | 2 lines
Fix typo in Python equivalent for bit_length.
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Doc/library/stdtypes.rst
Modified: python/branches/py3k/Doc/library/stdtypes.rst
==============================================================================
--- python/branches/py3k/Doc/library/stdtypes.rst (original)
+++ python/branches/py3k/Doc/library/stdtypes.rst Fri Dec 19 18:48:51 2008
@@ -442,7 +442,7 @@
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
More information about the Python-checkins
mailing list