[Datetime-SIG] PEP-431/495
Alexander Belopolsky
alexander.belopolsky at gmail.com
Sat Aug 22 01:33:46 CEST 2015
On Fri, Aug 21, 2015 at 4:49 PM, Tim Peters <tim.peters at gmail.com> wrote:
> > - Most of my thoughts got encoded in PEP-431. This would give us a
> > datetime module that operates exactly the way it does today,
>
> No. While 431 was highly obscure on this point, it turned out that
> Lennart was determined to change arithmetic behavior.
More importantly, PEP 431 did not propose adding any additional state to
datetime instances. The proposal [1] was to change signatures of the three
tzinfo methods and that of datetime.astimezone.
I don't think with PEP 431 alone, the following behavior specified [2] in
PEP 495 is possible:
>>> dt1.strftime('%D %T %Z%z')
'11/02/14 01:30:00 EDT-0400'
>>> dt2.strftime('%D %T %Z%z')
'11/02/14 01:30:00 EST-0500'
[1]: https://www.python.org/dev/peps/pep-0431/#new-parameter-is-dst
[2]:
https://www.python.org/dev/peps/pep-0495/#conversion-from-naive-to-aware
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150821/e8f0b95b/attachment.html>
More information about the Datetime-SIG
mailing list