[Datetime-SIG] Are there any "correct" implementations of tzinfo?
alexander.belopolsky at gmail.com
Mon Sep 14 22:39:14 CEST 2015
On Mon, Sep 14, 2015 at 4:22 PM, Tim Peters <tim.peters at gmail.com> wrote:
> > 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.
> So any programmer who implements .utcoffset() in Python should be
> fired? That's the only way I can read that.
No, no! I've already conceded that caching UTC offset will probably help
pure Python implementations. PyPy folks have established this fact for
hash and I am willing to extrapolate their results to UTC offset. I am
only trying to say that if we decide to bring a fast TZ database to
CPython, pure python tzinfo interface will likely become our main
bottleneck, not the speed with which C code can compute the offset value.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list