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.

作者 r.david.murray
收信人 Arfrever, benjamin.peterson, ethan.furman, r.david.murray
日期 2013-12-29.13:44:04
SpamBayes Score -1.0
Marked as misclassified
Message-id <1388324645.35.0.945276548175.issue20092@psf.upfronthosting.co.za>
In-reply-to
内容
Ah, I see.  A link to that issue would have been helpful :).

To summarize for anyone like me who didn't follow that issue: __index__ means the object can be losslessly converted to an int (is a true int), while __int__ may be an approximate conversion.  Thus it makes sense for an object to have an __int__ but not __index__, but vice-versa does not make sense.

Is someone updating the docs to reflect this, or should that be spun off as a separate issue as well?
历史
日期 用户 动作 参数
2013-12-29 13:44:05r.david.murray修改recipients: + r.david.murray, benjamin.peterson, Arfrever, ethan.furman
2013-12-29 13:44:05r.david.murray修改messageid: <1388324645.35.0.945276548175.issue20092@psf.upfronthosting.co.za>
2013-12-29 13:44:05r.david.murray链接issue20092 messages
2013-12-29 13:44:04r.david.murray创建