[Datetime-SIG] Timeline arithmetic?
tim.peters at gmail.com
Sat Sep 5 00:10:18 CEST 2015
>> The term "timeline arithmetic" (aka "strict arithmetic") was also made
>> up on this mailing list, but isn't needed to describe anything Python
> Not even the thing that Python does when you subtract two datetimes
> whose tzinfo differs?
It's reasonable to call that "timeline arithmetic". "Need" is much
stronger ;-) The docs don't give a name to it at all - they just
provide a mathematical expression defining the result. Because that,
and interzone comparison (which is really just a way of squashing most
of the bits out of interzone subtraction), are the only instances of
what's being called "timeline arithmetic" in this mailing list, the
docs are better off not naming it.
The docs don't give a name to what's being called "classic arithmetic"
here either, but for the opposite reason: that's so _much_ the norm,
there's no need to give a name to a thing with just a few exceptions
explicitly defined to do their own thing.
That's all about what "Python does". For talking about what some
future Python _may_ do, the terms can be indispensable.
More information about the Datetime-SIG