bigint <-> python long

Ellery Newcomer ellery-newcomer at utulsa.edu
Wed Sep 5 19:37:56 PDT 2012


On 09/05/2012 07:10 PM, bearophile wrote:
>
> Some D lazy ranges <==> Python lazy iterators/generators
>

I'll look into this one.

> array.array <==> D arrays

just checked, looks like we have it:

PyStmts(q"{from array import array; a = array('i', [44,33,22,11]);}", 
"testing");
assert(PyEval!(int[])("a", "testing") == [44,33,22,11]);

I think if the python object is iterable, it can be converted to array.

Matrices might pose a problem. But user can define custom conversions if 
need be.

>
> NumPy arrays <==> D arrays
>

I have never used NumPy. Are its arrays special?

>
>> Also, which of the following looks more appealing to you?
>
> I don't know.
>

ok, I'll be lazy then.



More information about the Digitalmars-d-learn mailing list