[issue19995] hex() and %x, oct() and %o do not behave the same

Eric V. Smith report at bugs.python.org
Mon Dec 16 14:11:38 CET 2013


Eric V. Smith added the comment:

It seems to me that by giving it an __index__ method, you're saying it can be used as an integer. It's not surprising to me that hex(), oct(), and bin() would work with a Grade.F object. If anything, I'd say that more places should use __index__ than currently do.

----------
nosy: +eric.smith

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19995>
_______________________________________


More information about the Python-bugs-list mailing list