PEP 495 (minor): Final edits.

This commit is contained in:
Alexander Belopolsky 2015-09-21 17:52:10 -04:00
parent 8ba4c55f8f
commit 8c4b892a2c
1 changed files with 6 additions and 7 deletions

View File

@ -343,7 +343,7 @@ The basic implementation of ``fromutc()`` in the abstract
``datetime.tzinfo`` class will not change. It is currently not used ``datetime.tzinfo`` class will not change. It is currently not used
anywhere in the stdlib because the only included ``tzinfo`` anywhere in the stdlib because the only included ``tzinfo``
implementation (the ``datetime.timezone`` class implementing fixed implementation (the ``datetime.timezone`` class implementing fixed
offset timezones) override ``fromutc()``. Keeping the default offset timezones) overrides ``fromutc()``. Keeping the default
implementation unchanged has the benefit that pre-PEP 3rd party implementation unchanged has the benefit that pre-PEP 3rd party
implementations that inherit the default ``fromutc()`` are not implementations that inherit the default ``fromutc()`` are not
accidentally affected. accidentally affected.
@ -369,7 +369,7 @@ In the Fold
----------- -----------
New subclasses should override the base-class ``fromutc()`` method and New subclasses should override the base-class ``fromutc()`` method and
implement it so that in all cases where two UTC times ``u0`` and implement it so that in all cases where two different UTC times ``u0`` and
``u1`` (``u0`` <``u1``) correspond to the same local time ``t``, ``u1`` (``u0`` <``u1``) correspond to the same local time ``t``,
``fromutc(u0)`` will return an instance with ``fold=0`` and ``fromutc(u0)`` will return an instance with ``fold=0`` and
``fromutc(u1)`` will return an instance with ``fold=1``. In all ``fromutc(u1)`` will return an instance with ``fold=1``. In all
@ -381,7 +381,7 @@ ambiguous time ``t`` corresponds to the time before or after the
transition. By definition, ``utcoffset()`` is greater before and transition. By definition, ``utcoffset()`` is greater before and
smaller after any transition that creates a fold. The values returned smaller after any transition that creates a fold. The values returned
by ``tzname()`` and ``dst()`` may or may not depend on the value of by ``tzname()`` and ``dst()`` may or may not depend on the value of
the fold attribute depending on the kind of the transition. the ``fold`` attribute depending on the kind of the transition.
.. image:: pep-0495-fold-2.png .. image:: pep-0495-fold-2.png
:align: center :align: center
@ -695,10 +695,9 @@ The following alternative names have also been considered:
**ltdf** **ltdf**
(Local Time Disambiguation Flag) - short and no-one will attempt (Local Time Disambiguation Flag) - short and no-one will attempt
to guess what it means without reading the docs. (Feel free to to guess what it means without reading the docs. (This abbreviation
use it in discussions with the meaning ltdf=False is the was used in PEP discussions with the meaning ``ltdf=False`` is the
earlier if you don't want to endorse any of the alternatives earlier by those who didn't want to endorse any of the alternatives.)
above.)
.. _original: https://mail.python.org/pipermail/python-dev/2015-April/139099.html .. _original: https://mail.python.org/pipermail/python-dev/2015-April/139099.html
.. _independently proposed: https://mail.python.org/pipermail/datetime-sig/2015-August/000479.html .. _independently proposed: https://mail.python.org/pipermail/datetime-sig/2015-August/000479.html