[Datetime-SIG] PEP-431/495

Alexander Belopolsky alexander.belopolsky at gmail.com
Sun Aug 23 00:49:30 CEST 2015

On Sat, Aug 22, 2015 at 6:28 PM, Tim Peters <tim.peters at gmail.com> wrote:

> [Chris Barker <chris.barker at noaa.gov>]
> > if it would be implemented by datetime, or a datetime subclass, wouldn't
> it
> > make sense for that attribute to be on the datetime instance, rather
> than a
> > tzinfo instance?
> Which is why arithmetic "belongs in" tzinfo too - how the local clock
> acts is entirely about the timezone.

While this is a very logical conclusion, I find it challenging to explain
why arithmetic selection flag "belongs" to tzinfo while the "local time
disambiguation flag" "belongs" to the datetime instance.  It feels
backwards: DST is the stuff about timezones while arithmetic is the stuff
about datetime.  Yet, we have what we have.  In an alternative universe,
maybe we could have a DateTime metaclass that would produce a separate
datetime class for each timezone and then tzinfo would be a class variable
rather than instance member.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150822/f15f4d95/attachment-0001.html>

More information about the Datetime-SIG mailing list