[issue17870] Python does not provide PyLong_FromIntMax_t() or PyLong_FromUintMax_t() function

Devin Jeanpierre report at bugs.python.org
Thu Jun 15 10:07:52 EDT 2017


Devin Jeanpierre added the comment:

Oh, to be clear on this last point:

> Hum, who else needs such function except of you?

Right now there is no way to convert an int that might be > 64 bits, into a python long, except really bizarre shenanigans, unless we want to rely on implementation-defined behavior.

This would be fine if it were easy to implement, but it isn't -- as we've both agreed, there's no good way to do this, and it is significantly easier to add this to CPython than to implement this from outside of CPython. And I do think there is merit in writing code that doesn't rely on implementation-defined behavior.

I also think it's simpler -- imagine if we just didn't care about all these int types! Phew.

Ack that this isn't "strong rationale" per your standards, so do whatever is right for this bug.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17870>
_______________________________________


More information about the Python-bugs-list mailing list