bigint <-> python long

Don Clugston dac at nospam.com
Thu Sep 6 01:08:42 PDT 2012


On 05/09/12 21:23, Paul D. Anderson wrote:
> On Wednesday, 5 September 2012 at 18:13:40 UTC, Ellery Newcomer wrote:
>> Hey.
>>
>> Investigating the possibility of providing this conversion in pyd.
>>
>> Python provides an api for accessing the underlying bytes.
>>
>> std.bigint seemingly doesn't. Am I missing anything?
>
> No, I don't believe so. AFAIK there is no public access to the
> underlying array, but I think it is a good idea.
>
> I suspect the reason for not disclosing the details is to disallow
> anyone putting the data into an invalid state. But read-only access
> would be safe.

No, it's just not disclosed because I didn't know the best way to do it.
I didn't want to put something in unless I was sure it was correct.
(And a key part of that, is what is required to implement BigFloat).



More information about the Digitalmars-d-learn mailing list