[issue36972] Add SupportsIndex

2019-05-20 Thread Paul Dagnelie
Change by Paul Dagnelie : -- keywords: +patch pull_requests: +13358 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36972> ___ ___ Py

[issue36972] Add SupportsIndex

2019-05-20 Thread Paul Dagnelie
New submission from Paul Dagnelie : In order to allow hex() oct() and bin() to be used on user-defined classes, and to check if they can be used on a class at runtime, a SupportsIndex protocol would be useful to integrate. A PR already exists in the backport repo for this issue: https