[issue2337] Backport oct() and hex() to use __index__

Benjamin Peterson report at bugs.python.org
Sun Apr 27 02:31:25 CEST 2008

Benjamin Peterson <musiccomposition at gmail.com> added the comment:

This is what I'd like to do: In builtin oct/hex check if the special
method is declared. If it is, Py3k warn and use it. If not, check if we
can do it the Py3k way (with PyNumber_ToBase). Sound good?

nosy: +benjamin.peterson

Tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list