[Python-Dev] PEP 495 accepted

Tim Peters tim.peters at gmail.com
Tue Sep 22 17:16:11 CEST 2015


[Tim]
> ...
> The
> top-level operation on the RHS is datetime.fromtimestamp().  However,
> it didn't pass a tzinfo, so it creates a naive datetime.  Assuming dt
> was aware to begin with, the attempt to compare will always (gap or
> not) raise an exception.

Oops!  In current Python, comparing naive and aware via `==` just
returns False.  That's even more confusing ;-)


More information about the Python-Dev mailing list