This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Devin Jeanpierre, benjamin.peterson, josh.r, mark.dickinson, pitrou, serhiy.storchaka, vstinner, yselivanov
Date 2017-06-15.13:53:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1497534795.2.0.343054968695.issue17870@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-06-15 13:53:15vstinnersetrecipients: + vstinner, mark.dickinson, pitrou, benjamin.peterson, Devin Jeanpierre, serhiy.storchaka, yselivanov, josh.r
2017-06-15 13:53:15vstinnersetmessageid: <1497534795.2.0.343054968695.issue17870@psf.upfronthosting.co.za>
2017-06-15 13:53:15vstinnerlinkissue17870 messages
2017-06-15 13:53:15vstinnercreate