[Datetime-SIG] Another round on error-checking

Alexander Belopolsky alexander.belopolsky at gmail.com
Thu Sep 3 17:19:16 CEST 2015


On Thu, Sep 3, 2015 at 11:05 AM, Tim Peters <tim.peters at gmail.com> wrote:

> The conceptual muddying here is that this kind of stuff wasn't
> possible before when sticking within a _single_ zone.
>

This is what Carl is complaining about, but once you realize that fold=1 on
an ambiguous datetime instance effectively modifies the zone (changes the
value returned by utcoffset()), it becomes quite natural.


>   We are introducing oddball cases of timeline arithmetic into what used
> to be
> "surprise-free" classic arithmetic.  I don't like that, but I'm not
> scared to death of it either.  Yet ;-)
>

Wait for the next PEP update. :-)  I am adding a section titled "An
Overview of the Current State of Aware Arithmetic and Comparisons."   A
reader who will survive that won't be impressed by the additional PEP 495
rules.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150903/14814591/attachment.html>


More information about the Datetime-SIG mailing list