Ethan Furman previously stated:
-------------------------------
> So the complete list of spcecifiers then is d, i, o, u, U, and c [1], and they
> should work if __index__ works.
Okay, so 'd' then should be considered a conversion operation, whilst the others should only work if the object is actually an integer type (which is implied by specifying __index__).
In other words
- if %d or %u is specified, try __int__, then __index__
(according to the docs, u is obsolete and identical to d)
- if %i, %o, %x, %X, or %c is specified, try only __index__
Agreed? |