[Datetime-SIG] PEP 495: What's left to resolve

Alexander Belopolsky alexander.belopolsky at gmail.com
Tue Sep 8 19:55:06 CEST 2015


On Tue, Sep 8, 2015 at 1:50 PM, Tim Peters <tim.peters at gmail.com> wrote:

> I assumed you were showing an implementation of datetime.__eq__.  Yes?
>  In that case, `self` and `other` may both be naive on entry.  Then
> the first two lines effectively make exactly copies of them.  Since
> None is None, the `self.tzinfo is other.tzinfo` check succeeds, and so
> goes on to compare n_self to n_other - which are exact copies of the
> original inputs.  Lather, rinse, repeat.
>

Got it.  No, I was not concerned with the naive case - I assumed that it
was magically fulfilled without calling this __eq__ method.  If this idea
passes a sniff test - I will implement it in my fork so that we can play
with a working prototype.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150908/90efaf88/attachment.html>


More information about the Datetime-SIG mailing list