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

Serhiy Storchaka report at bugs.python.org
Mon Dec 16 18:16:13 CET 2013


Serhiy Storchaka added the comment:

> > Did I mention __index__ is an unfortunate name for the current trend for
> > this method?
> Yes, but it's probably too late to change that now.  Also, a fully precise
> name would be something like:
> 
>   __to_int_exact_iff_object_has_integer_nature__ :)

Perhaps in future (may be in 4.0) __index__ should be renamed to __int__ and 
__int__ to __trunc__.

----------

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


More information about the Python-bugs-list mailing list