[Datetime-SIG] Making tm_gmtoff and tm_zone available on all platforms
Guido van Rossum
guido at python.org
Tue Sep 29 23:03:14 CEST 2015
OK, I think this is fine then.
On Mon, Sep 28, 2015 at 8:29 PM, Alexander Belopolsky <
alexander.belopolsky at gmail.com> wrote:
>
> 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.
>
--
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150929/2296a768/attachment.html>
More information about the Datetime-SIG
mailing list