[Datetime-SIG] PEP-0500 (Alternative datetime arithmetic) Was: PEP 495 ... is ready ...

Guido van Rossum guido at python.org
Tue Aug 18 17:07:26 CEST 2015

On Tue, Aug 18, 2015 at 7:39 AM, Ethan Furman <ethan at stoneleaf.us> wrote:

> 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.

Yes, but there are other options. PEP 500 allows way more freedom than is

--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150818/7a067dc6/attachment.html>

More information about the Datetime-SIG mailing list