Message346731
| Author | mark.dickinson |
|---|---|
| Recipients | mark.dickinson, nodakai, rhettinger, tim.peters |
| Date | 2019-06-27.12:32:08 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1561638728.74.0.00981134262834.issue37427@roundup.psfhosted.org> |
| In-reply-to |
| Content | |
|---|---|
> I'm finding it rather hard to guess what the rules are for what works and what doesn't So now that I've looked at the source: anything with an `__int__` method works, except that `float` instances are explicitly excluded. So this explains for example: >>> sorted([1, 2, 3], reverse=numpy.float64(0.5)) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: integer argument expected, got float >>> sorted([1, 2, 3], reverse=numpy.float32(0.5)) [1, 2, 3] |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2019-06-27 12:32:08 | mark.dickinson | set | recipients: + mark.dickinson, tim.peters, rhettinger, nodakai |
| 2019-06-27 12:32:08 | mark.dickinson | set | messageid: <1561638728.74.0.00981134262834.issue37427@roundup.psfhosted.org> |
| 2019-06-27 12:32:08 | mark.dickinson | link | issue37427 messages |
| 2019-06-27 12:32:08 | mark.dickinson | create | |