[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-02-01 Thread Roundup Robot
Changes by Roundup Robot : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/pytho

[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-02-01 Thread Roundup Robot
Changes by Roundup Robot : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/pytho

[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-02-01 Thread Roundup Robot
Changes by Roundup Robot : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/pytho

[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset d03fd5d041b6f514daf0aabc0c159d8727c33980 by Mariatta Wijaya in branch '2.7': Issue #29329: Improve documentation for hex(). Patch by Ammar Askar https://github.com/python/cpython/commit/d03fd5d041b6f514daf0aabc0c159d8727c33980 -- ___

[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-02-01 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- resolution: -> fixed stage: commit review -> resolved ___ Python tracker ___ ___ Python-bugs-list mai

[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-02-01 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks, Pekka, Eryk, Ammar, and Zachary :) -- status: open -> closed ___ Python tracker ___ ___ Pyt

[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset d7804789368a by Mariatta Wijaya in branch '2.7': Issue #29329: Improve documentation for hex(). Patch by Ammar Askar https://hg.python.org/cpython/rev/d7804789368a -- nosy: +python-dev ___ Python tracker

[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-02-01 Thread Zachary Ware
Zachary Ware added the comment: LGTM. -- assignee: docs@python -> Mariatta nosy: +Mariatta, zach.ware stage: needs patch -> commit review ___ Python tracker ___ _

[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-01-31 Thread Ammar Askar
Ammar Askar added the comment: Attached patch changes the py2.7 documentation to point out that the method name is __hex__ and its return type is a string. -- keywords: +patch nosy: +ammar2 Added file: http://bugs.python.org/file46466/hex_method.diff ___

[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-01-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> docs@python components: +Documentation keywords: +easy nosy: +docs@python stage: -> needs patch versions: +Python 2.7 ___ Python tracker _

[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-01-19 Thread Eryk Sun
Eryk Sun added the comment: Python 3 uses __index__ for bin(), oct(), and hex(), but Python 2 only uses __index__ for bin() and otherwise uses __oct__ and __hex__. Antoine overlooked this when updating the 2.7 docs for hex() in issue 16665. -- nosy: +eryksun __

[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-01-19 Thread Pekka Klärck
New submission from Pekka Klärck: Documentation of `hex()` on Python 2 says that custom objects need to implement `__index__` to support it. Based on my tests that doesn't work but `__hex__` is needed instead. Docs are at https://docs.python.org/2/library/functions.html?highlight=hex#hex and h