[Datetime-SIG] Timeline arithmetic?
chris.barker at noaa.gov
Fri Sep 4 20:38:58 CEST 2015
On Fri, Sep 4, 2015 at 11:19 AM, Carl Meyer <carl at oddbird.net> wrote:
> On 09/04/2015 12:11 PM, Alexander Belopolsky wrote:
> > Keep in mind that the standard library should not only support "casual
> > users", but also those who will write a "period
> > recurrence library" for those "casual users." This is where classic
> > arithmetic is indispensable.
I dont get that at all -- a Period recurrence lib needs to know all sorts
of stuff about the timezone, and other things, like days of the week. And
it needs to be able to do "timeline arithmetic", but it would presumable be
able to remove and tack back on a tzinfo object all on it's own -- i.e. so
the arithmetic it wants.
But maybe if I tried to implement one (which I will never do) , I'd see you
point. Bu tin any case, doesn't dateutils already provide this?
Btw, I have a minor objection to the term "classic arithmetic." It's a
> made-up term from this mailing list, and I don't think it describes a
> real distinct thing, it's just a euphemism for "naive arithmetic."
well, naive arithmetic is a made-up term too. there was a lot of bandying
about about terminology early on, and this seems to be what we've settled
on. And unlike "Period arithmetic" or "Duration arithmetic", I haven't seen
any other reference to this type of arithmetic anywhere.
> I'm not sure why the euphemism arose; I _think_ it arose because it
> sounds wrong to say that aware datetimes perform naive arithmetic.
yes -- I know I, and probably other thought "naive arithmetic" meant
arithmetic on naive datetimes -- there was much confusion ;-)
I don't see any point in using a made-up euphemism to hide it :-)
unless you can find another reference, we need to make up something.
Christopher Barker, Ph.D.
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Datetime-SIG