Message144126
| Author | mark.dickinson |
|---|---|
| Recipients | mark.dickinson, meador.inge, skrah |
| Date | 2011-09-16.11:59:06 |
| SpamBayes Score | 0.0037592305 |
| Marked as misclassified | No |
| Message-id | <1316174347.72.0.567410783453.issue12974@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
Yes, that's intentional. When use of __int__ was deprecated, a bug report popped up from someone who wanted to be able to have their own objects treated as integers for the purposes of struct.pack. (I don't recall which issue; Meador, do you remember?) So we added use of __index__ at that point. I think __index__ is the right interface for something to expose if it wants to be usable as an integer, and this usage is consistent with the original __index__ PEP. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2011-09-16 11:59:07 | mark.dickinson | set | recipients: + mark.dickinson, skrah, meador.inge |
| 2011-09-16 11:59:07 | mark.dickinson | set | messageid: <1316174347.72.0.567410783453.issue12974@psf.upfronthosting.co.za> |
| 2011-09-16 11:59:07 | mark.dickinson | link | issue12974 messages |
| 2011-09-16 11:59:06 | mark.dickinson | create | |