[Python-Dev] PEP 495 accepted (original) (raw)
Tim Peters tim.peters at gmail.com
Tue Sep 22 17:16:11 CEST 2015
- Previous message (by thread): [Python-Dev] PEP 495 accepted
- Next message (by thread): [Python-Dev] PEP 495 accepted
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[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 ;-)
- Previous message (by thread): [Python-Dev] PEP 495 accepted
- Next message (by thread): [Python-Dev] PEP 495 accepted
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]