From a9da6d1a7b4eebf974746f740962eeabbabc8bcf Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Fri, 19 Dec 2008 17:48:51 +0000 Subject: [PATCH] Merged revisions 67857 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r67857 | mark.dickinson | 2008-12-19 17:46:51 +0000 (Fri, 19 Dec 2008) | 2 lines Fix typo in Python equivalent for bit_length. ........ --- Doc/library/stdtypes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index de00c491e7..a1eb6886b4 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -442,7 +442,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 -- 2.40.0