[Datetime-SIG] PEP-0500 (Alternative datetime arithmetic) Was: PEP 495 ... is ready ...
ethan at stoneleaf.us
Tue Aug 18 16:39:19 CEST 2015
On 08/17/2015 02:16 PM, Guido van Rossum wrote:
> On Mon, Aug 17, 2015 at 1:46 PM, Alexander Belopolsky wrote:
> Well, everyone implementing a tzinfo class will be confronted with the question
> whether to provide those special methods or not. And they may well be copy/pasting
> code that implements them. So my claim is that this makes the life of everyone
> implementing a tzinfo a little more complex, not just that of tzinfo implementers
> who actually need this protocol. Just like the mere existence of __length_hint__
> serves as a distraction for anyone implementing an iterator.
Having briefly read PEP 500 it seems to me the primary use case is the DST transition; I can easily imagine experiments, studies, laboratory processes, etc., that need to be aware of how many hours
have/will have passed, and being off by that one hour (or 30 minutes, or whatever) is simply not acceptable.
More information about the Datetime-SIG