STINNER Victor added the comment:

Me:
> Write your own C extension to do that. Sorry, I don't know what is the best 
> way to write such C extension.

Devin Jeanpierre:
> If everyone who wants to convert intptr_t to a python int has to write their 
> own function, then why not just include it in the C-API?

Hum, who else needs such function except of you?

CPython is maintained by volunteers. The maintenance has a high cost, so we 
need a strong rationale before adding new features. In this case, it was 
decided by core developers that the added complexity (amount of code) is not 
worth it since the use case is too rare.

Devin:
> Reopening since this use-case doesn't sound solved yet.

Devin, I asked you for a strong rationale to add the feature. I don't see such 
rationale, so this issue will be closed again.

Serhiy:
> It may be better to make _PyLong_FromByteArray() and _PyLong_AsByteArray() 
> public.

That makes sense. I suggest to open a new issue for that.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17870>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to