From ebfb2f76c5c7e1f5e3a37b719501e0e1ae6f680f Mon Sep 17 00:00:00 2001 From: Mariatta Wijaya Date: Wed, 1 Feb 2017 22:27:02 -0800 Subject: [PATCH] Issue #29329: Improve documentation for hex(). Patch by Ammar Askar --- Doc/library/functions.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index f294b6eab2..c1ce258661 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. -- 2.50.1