diff -r 51e7c9b54f56 Doc/library/functions.rst --- a/Doc/library/functions.rst Tue Jan 31 13:56:50 2017 +0100 +++ b/Doc/library/functions.rst Tue Jan 31 11:14:08 2017 -0500 @@ -617,7 +617,7 @@ '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.