]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #29329: Improve documentation for hex(). Patch by Ammar Askar
authorMariatta Wijaya <mariatta.wijaya@gmail.com>
Thu, 2 Feb 2017 06:27:02 +0000 (22:27 -0800)
committerMariatta Wijaya <mariatta.wijaya@gmail.com>
Thu, 2 Feb 2017 06:27:02 +0000 (22:27 -0800)
Doc/library/functions.rst

index f294b6eab20af31f676ad68809d4e3f314198538..c1ce258661b9f054f99d5d253944bad9c3652657 100644 (file)
@@ -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.