D extensions to python, inline in an ipython/jupyter notebook

Laeeth Isharc via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Fri Jul 3 17:16:07 PDT 2015


On Saturday, 4 July 2015 at 00:14:51 UTC, Laeeth Isharc wrote:
> On Friday, 3 July 2015 at 21:46:09 UTC, John Colvin wrote:
>> On Friday, 3 July 2015 at 15:56:24 UTC, Laeeth Isharc wrote:
>>>> Aren't there time-zone concerns? Or is this just a mapping 
>>>> between D's std.datetime.DateTime and python's 
>>>> datetime.datetime with tzinfo==None, i.e. a naive date?
>>>>
>>>> Also, there would have to be some serious warning signs 
>>>> about translating from python to D, in that the 
>>>> micro-seconds will be truncated. Doesn't a lack of 
>>>> microseconds make it unusable for tick data?
>>>
>>> https://docs.python.org/3/c-api/datetime.html
>>>
>>> The Python API has microseconds passed as an int in last 
>>> argument.  You're right that I hadn't considered that D 
>>> DateTime doesn't have fractions of a second (I think), so a 
>>> SysTime would be better.
>>>
>>> On the other hand, I think datetime.datetime and numpy 
>>> datetime64 are timezone-free.
>>
>> both datetime.datetime and numpy.datetime64 have timezone 
>> support.
>
>
> Great - in that case 2b makes sense.

or rather, not 2b, but just mapping python + numpy to a SysTime


More information about the Digitalmars-d-announce mailing list