[Tim] >> It depends on how expensive .utcoffset() >> is, which in turn depends on how the tzinfo author implements it.
[Alex] > No, it does not. In most time zones, UTC offset in seconds can be computed > by C code as a 4-byte integer Which is a specific implementation of .utcoffset(). Which likely has nothing to do with how most tzinfo authors will implement _their_ .utcoffset(). For example, look at any tzinfo.utcoffset() implementation that currently exists ;-) > 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. > Yet I agree, "'premature optimization' applies at this time." I'm more worried now about premature firing ;-) _______________________________________________ Datetime-SIG mailing list [email protected] https://mail.python.org/mailman/listinfo/datetime-sig The PSF Code of Conduct applies to this mailing list: https://www.python.org/psf/codeofconduct/
