[Python-ideas] Is there a reason some of the PyLong_As* functions don't call an object's __int__?
erik.m.bray at gmail.com
Fri Dec 8 09:12:30 EST 2017
On Fri, Dec 8, 2017 at 1:52 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> On Fri, 8 Dec 2017 14:30:00 +0200
> Serhiy Storchaka <storchaka at gmail.com>
>> NumPy integers implement __index__.
> That doesn't help if a function calls e.g. PyLong_AsLongAndOverflow().
Right--pointing to __index__ basically implies that PyIndex_Check and
subsequent PyNumber_AsSsize_t than there currently are. That I could
agree with but then it becomes a question of where are those cases?
And what do with, e.g. interfaces like PyLong_AsLongAndOverflow().
Add more PyNumber_ conversion functions?
More information about the Python-ideas