[Datetime-SIG] Another round on error-checking

Alexander Belopolsky alexander.belopolsky at gmail.com
Tue Sep 1 18:06:36 CEST 2015


On Tue, Sep 1, 2015 at 11:59 AM, Alexander Belopolsky <
alexander.belopolsky at gmail.com> wrote:

> Third observation:  If we have only one variable offset timezone (Local),
> then we can solve the problem by defining datetime.__hash__(self) as for
> example, hash(self.astimezone(Local).replace(fold=0) - datetime(1, 1, 1,
> tzinfo=Local)).
>

Note that given classic arithmetic, .replace(fold=0) is redundant.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150901/77968437/attachment-0001.html>


More information about the Datetime-SIG mailing list