From: Mariatta Wijaya Date: Thu, 2 Feb 2017 06:27:02 +0000 (-0800) Subject: Issue #29329: Improve documentation for hex(). Patch by Ammar Askar X-Git-Tag: v2.7.14rc1~284 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebfb2f76c5c7e1f5e3a37b719501e0e1ae6f680f;p=thirdparty%2FPython%2Fcpython.git Issue #29329: Improve documentation for hex(). Patch by Ammar Askar --- diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index f294b6eab20a..c1ce258661b9 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -617,7 +617,7 @@ section. '0x1L' If x is not a Python :class:`int` or :class:`long` object, it has to - define an __index__() method that returns an integer. + define a __hex__() method that returns a string. See also :func:`int` for converting a hexadecimal string to an integer using a base of 16.