vinsci added the comment: >>> (0).bit_length.__doc__ "int.bit_length() -> int\n\nNumber of bits necessary to represent self in binary.\n>>> bin(37)\n'0b100101'\n>>> (37).bit_length()\n6"
The library documentation has clearly been written in disregard of the advertised functionality in the docstrings of the methods. The documentation is just echoing the flaws of the unit tests. For the Python 3 variant of this issue, it can be added that the library documentation wrongly states that the method is "New in version 3.1.". ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue31079> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com