◐ Shell
clean mode source ↗

Message 206371 - Python tracker

> In other words
> 
>   - if %d or %u is specified, try __int__, then __index__
>     (according to the docs, u is obsolete and identical to d)

Again, I don't think trying __index__ is useful.

>   - if %i, %o, %x, %X, or %c is specified, try only __index__

I think everything yielding a decimal output should work with floats
(i.e. %i too).