Message334122
| Author |
jdemeyer |
| Recipients |
AVINASH MISHRA, jdemeyer, ncoghlan, remi.lapeyre, ronaldoussoren, serhiy.storchaka, vstinner |
| Date |
2019年01月21日.10:48:34 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1548067714.77.0.445921593222.issue35707@roundup.psfhosted.org> |
| In-reply-to |
| Content |
The motivation for PEP 357 was certainly using an object as the index for a sequence, but that's not the only use case.
In fact PEP 357 states "For example, the slot can be used any time Python requires an integer internally"
So despite the name __index__, I think that this is now the de facto standard for "convert the object (which is some kind of integer) to a Python int without loss of precision". |
|