[Python-Dev] datetime nanosecond support (ctd?)

Matthieu Bec mbec at gmto.org
Wed Dec 17 01:41:41 CET 2014



On 12/16/14 3:31 PM, Matthieu Bec wrote:
>
>
> On 12/16/14 3:28 PM, Matthieu Bec wrote:
>>
>> Maybe what I meant with `nothing looks quite right':
>> seconds as float, microseconds as float, nanosecond as 0..999,
>> nanoseconds as 0..999999999 with mandatory keyword that precludes
>> microseconds - all can be made to work, none seems completely satisfying.
>>
>> In fact, I don't really have a use for it from python - but something
>> would be needed in C for the implementation of datetime.from_timespec
>> and time.from_timespec that calls the constructor
>
> that's the datetime.time.from_timespec btw.

datetime.time.from_timespec actually makes no sense.


>> PyObjectCall_CallFunction(clas,"...",...) - can this happen and remain
>> hidden from the python layer?

... occured to me I might simply create a us datetime object and set its 
nanofield after.

I'll try wrap up a recap proposal later.

Regards,
Matthieu



More information about the Python-Dev mailing list