Re: [Datetime-SIG] Making tm_gmtoff and tm_zone available on all platforms
On Mon, Sep 28, 2015 at 11:04 PM, Guido van Rossum <guido@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.
participants (1)
-
Alexander Belopolsky