On Fri, Jul 31, 2015 at 12:02 PM, Guido van Rossum <[email protected]> wrote:
> On Fri, Jul 31, 2015 at 5:15 AM, Chris Barker <[email protected]> wrote:
>>
>> On Thu, Jul 30, 2015 at 6:09 PM, Ethan Furman <[email protected]> wrote:
>>>
>>> On 07/30/2015 06:04 PM, Tim Peters wrote:
>>>
>>>> I like Alexander's new tzstrict (subclass of tzinfo) idea best so far.
>
>
> I like it too.

Thanks for the kind words, Tim, Ethan and Guido!  I've also wondered
about a possibility to delegate arithmetics to the timezone class altogether.

For example, we could have a rule like this:

def __add__(self, delta):
    if hasattr(self.tzinfo, 'add'):
         return self.tzinfo.add(self, delta)

This, in theory, is powerful enough to support leap seconds if we represent
23:59:60.x as time(23, 59, 59, x, first=False).
_______________________________________________
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/

Reply via email to