[Datetime-SIG] Are there any "correct" implementations of tzinfo?
alexander.belopolsky at gmail.com
Mon Sep 14 22:01:03 CEST 2015
On Mon, Sep 14, 2015 at 3:49 PM, Tim Peters <tim.peters at gmail.com> wrote:
> It depends on how expensive .utcoffset()
> is, which in turn depends on how the tzinfo author implements it.
No, it does not. In most time zones, UTC offset in seconds can be computed
by C code as a 4-byte integer faster than CPython can look up the
.utcoffset method. (At least for times within a few years around now.) A
programmer who makes it slower should be fired. Yet I agree,
applies at this time."
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list