[Datetime-SIG] Making tm_gmtoff and tm_zone available on all platforms

Alexander Belopolsky alexander.belopolsky at gmail.com
Tue Sep 29 05:29:59 CEST 2015

On Mon, Sep 28, 2015 at 11:04 PM, Guido van Rossum <guido at python.org> wrote:
> I had been wondering about that myself. But your implementation proposal
sounds kind of expensive, doesn't it?

It could be with a naive implementation that would simply fill additional
fields in the existing time.struct_time object, but we can also modify the
struct_time class to compute the additional attributes only when they are
requested.  (I believe struct_time is currently implemented as
PyStructSequence, so we will probably need to subclass that somehow.)

On the other hand, I would start with a naive implementation and worry
about the optimizations later.  As far as I know, the POSIX layer on
Windows (which is the main platform that will be affected) is already very
slow, so the price of cross-platform portability may be within user
expectations in this case.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150928/f4e18862/attachment.html>

More information about the Datetime-SIG mailing list