On Thu, Sep 3, 2015 at 8:56 AM, Tim Peters <[email protected]> wrote:
> > And intentional or not, "classic" arithmetic may be easy to implement > > and fast, but it is hard to explain, surprising, and not very useful. > > <snip> > > As to being hard to explain, > you must be joking: sigh. Look at the length of this stinking thread! and how much confusion there was at the beginning about what the heck the current datetime implementation actually did. Classic arithmetic may well be the best possible solution given the constraints, but it is not obvious, clear, lacking in surprises or well documented ( and no one reads docs until they run into a problem) I know I only got it when someone explained the implementation: "remove the tzinfo object, do the math, tack the tzinfo back on" Simple elegant, and now I get it. And get why things go wonky with datetimes with two different tzinfo objects. By the way, something like that should be in the docs. Anyway, clearly timeline math is an important use case for folks -- just as many (more?) than classic math. It would be nice to support it one way or another. Which can have nothing to do with this PEP -- so carry one. -Chris -- Christopher Barker, Ph.D. Oceanographer 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 [email protected]
_______________________________________________ Datetime-SIG mailing list [email protected] https://mail.python.org/mailman/listinfo/datetime-sig The PSF Code of Conduct applies to this mailing list: https://www.python.org/psf/codeofconduct/
