[Python-Dev] datetime nanosecond support
Stuart Bishop
stuart at stuartbishop.net
Mon Jul 30 06:56:53 CEST 2012
On Wed, Jul 25, 2012 at 9:11 PM, Christian Heimes <lists at cheimes.de> wrote:
> Am 25.07.2012 14:11, schrieb Nick Coghlan:
>> 1. For the reasons presented, I think it's worth attempting to define
>> a common API that is based on datetime, but is tailored towards high
>> precision time operations (at least using a different internal
>> representation, perhaps supporting TAI).
>
> This is a great opportunity to implement two requests at once. Some
> people want high precision datetime objects while others would like to
> see a datetime implementation that works with dates BC.
Back when the datetime library was being designed, a limiting factor
was size of the pickle (for reasons that I think no longer apply).
Support for the is_dst flag was never in there, only because the extra
single bit required overflowed the pickle size limit. If api changes
are being considered, please consider adding this bit back to match
the standard libraries. This will let me make the pytz timezone
library's API saner, and allow Python to do wallclock datetime
arithmetic without ambiguous cases.
--
Stuart Bishop <stuart at stuartbishop.net>
http://www.stuartbishop.net/
More information about the Python-Dev
mailing list