This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ethan.furman
Recipients Arfrever, eric.smith, ethan.furman, gvanrossum, mark.dickinson, pitrou, rhettinger, serhiy.storchaka, skrah, vstinner
Date 2013-12-16.21:14:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1387228475.76.0.486748687513.issue19995@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2013-12-16 21:14:35ethan.furmansetrecipients: + ethan.furman, gvanrossum, rhettinger, mark.dickinson, pitrou, vstinner, eric.smith, Arfrever, skrah, serhiy.storchaka
2013-12-16 21:14:35ethan.furmansetmessageid: <1387228475.76.0.486748687513.issue19995@psf.upfronthosting.co.za>
2013-12-16 21:14:35ethan.furmanlinkissue19995 messages
2013-12-16 21:14:35ethan.furmancreate