Message185530
| Author | eric.snow |
|---|---|
| Recipients | barry, docs@python, eric.snow |
| Date | 2013-03-30.00:29:36 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1364603376.41.0.418321948666.issue17576@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
Would it be okay to do a check on __index__ after the PyLong_Check() succeeds? Something like this:
if (PyLong_Check(item) &&
item->ob_type->tp_as_number->nb_index == PyLong_Type.tp_as_number->nb_index) {
Py_INCREF(item);
return item;
}
This is something Nick and I were talking about at the sprints regarding fast paths in the abstract API (for mappings and sequences in our case). |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2013-03-30 00:29:36 | eric.snow | set | recipients: + eric.snow, barry, docs@python |
| 2013-03-30 00:29:36 | eric.snow | set | messageid: <1364603376.41.0.418321948666.issue17576@psf.upfronthosting.co.za> |
| 2013-03-30 00:29:36 | eric.snow | link | issue17576 messages |
| 2013-03-30 00:29:36 | eric.snow | create | |