Re: [Datetime-SIG] Calendar vs timespan calculations...
30 Jul
2015
30 Jul
'15
4:45 p.m.
Oops! Forgot one: [Guido]
... create new timedelta-ish classes that implement "human" arithmetic
Note that there's an annoying inelegance here: after datetime2 = datetime1 + timedeltaish # or subtraction then what does: datetime2 - datetime1 produce? Knowledge of the _kind_ of timedelta-ish object used to produce datetime2 is long gone, so it may not be the case that datetime2 - datetime1 == timedeltaish or even produce an object of the same class as timedeltaish. Of course that's never a problem today. If the inelegance is thought to be unbearable, I suppose new timedelta-ish classes could provide an explicit class method to subtract datetime instances (yielding "the right" timedelta-ish object of the class).
3186
Age (days ago)
3186
Last active (days ago)
0 comments
1 participants
participants (1)
-
Tim Peters