[Datetime-SIG] PEP 495 (Local Time Disambiguation) is ready for pronouncement

Ethan Furman ethan at stoneleaf.us
Tue Aug 18 22:06:33 CEST 2015


On 08/18/2015 12:31 PM, Alexander Belopolsky wrote:

> I used
>
>  t.replace(later=True) - t.replace(later=False) < 0
>
> as a shorthand for
>
>    t.replace(later=True).timestamp() - t.replace(later=False).timestamp() < 0
>
> (The 0 in the r.h.s. instead of timedelta(0) > could serve as a hint.)

The result was invalid and confusing code.  Please don't do that.

--
~Ethan~


More information about the Datetime-SIG mailing list