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.22:11:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Antoine, if I understand you correctly, you are saying that any type that defines __index__ is an integer, and should therefore also define __int__, in which case Python can just use __int__ and not worry about __index__?

Here's the problem with that:

  --> '%x' % 3.14

While I am beginning to agree that an integer type needs to implement both __int__ and __index__, it still remains true that Python needs to call __index__ if what it needs is already a real, true int, and not just something that can be truncated or otherwise converted into an int -- such as float.
Date User Action Args
2013-12-16 22:11:08ethan.furmansetrecipients: + ethan.furman, gvanrossum, rhettinger, mark.dickinson, pitrou, vstinner, eric.smith, Arfrever, skrah, serhiy.storchaka
2013-12-16 22:11:08ethan.furmansetmessageid: <>
2013-12-16 22:11:08ethan.furmanlinkissue19995 messages
2013-12-16 22:11:07ethan.furmancreate