[Datetime-SIG] Timeline arithmetic?
Alexander Belopolsky
alexander.belopolsky at gmail.com
Sat Sep 5 00:02:17 CEST 2015
On Fri, Sep 4, 2015 at 5:54 PM, Carl Meyer <carl at oddbird.net> wrote:
> [Tim]
> > The term "timeline arithmetic" (aka "strict arithmetic") was also made
> > up on this mailing list, but isn't needed to describe anything Python
> > does.
>
> Not even the thing that Python does when you subtract two datetimes
> whose tzinfo differs?
>
No, because in this case there is no sensible alternative other than what
is implemented and making it an error. The only case where two options
make sense is the t1 - t2 case where t1.tzinfo is t2.tzinfo. In this
case "timeline arithmetic" is not used, so it does not need a name.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150904/475bd119/attachment.html>
More information about the Datetime-SIG
mailing list