[Python-checkins] peps: Update from Lennart

brett.cannon python-checkins at python.org
Sun Feb 10 20:34:46 CET 2013


http://hg.python.org/peps/rev/fe7cd22d1064
changeset:   4732:fe7cd22d1064
user:        Brett Cannon <brett at python.org>
date:        Sun Feb 10 14:34:41 2013 -0500
summary:
  Update from Lennart

files:
  pep-0431.txt |  28 ++++++++++++----------------
  1 files changed, 12 insertions(+), 16 deletions(-)


diff --git a/pep-0431.txt b/pep-0431.txt
--- a/pep-0431.txt
+++ b/pep-0431.txt
@@ -8,7 +8,7 @@
 Type: Standards Track
 Content-Type: text/x-rst
 Created: 11-Dec-2012
-Post-History: 11-Dec-2012, 28-Dec-2012
+Post-History: 11-Dec-2012, 28-Dec-2012, 28-Jan-2013
 
 
 Abstract
@@ -94,7 +94,7 @@
 
 When changing over from daylight savings time (DST) the clock is turned back
 one hour. This means that the times during that hour happens twice, once
-without DST and then once with DST. Similarly, when changing to daylight
+with DST and then once without DST. Similarly, when changing to daylight
 savings time, one hour goes missing.
 
 The current time zone API can not differentiate between the two ambiguous
@@ -156,10 +156,10 @@
 function, one new exception and four new collections. In addition to this, several
 methods on the datetime object gets a new ``is_dst`` parameter.
 
-New class ``DstTzInfo``
-^^^^^^^^^^^^^^^^^^^^^^^^
+New class ``dsttimezone``
+^^^^^^^^^^^^^^^^^^^^^^^^^
 
-This class provides a concrete implementation of the ``zoneinfo`` base
+This class provides a concrete implementation of the ``tzinfo`` base
 class that implements DST support.
 
 
@@ -176,10 +176,10 @@
 database which should be used. If not specified, the function will look for
 databases in the following order:
 
-1. Use the database in ``/usr/share/zoneinfo``, if it exists.
+1. Check if the `tzdata-update` module is installed, and then use that
+   database.
 
-2. Check if the `tzdata-update` module is installed, and then use that
-   database.
+2. Use the database in ``/usr/share/zoneinfo``, if it exists.
 
 3. Use the Python-provided database in ``Lib/tzdata``.
 
@@ -206,7 +206,7 @@
 
 ``False`` will specify that the given datetime should be interpreted as not
 happening during daylight savings time, i.e. that the time specified is after
-the change from DST.
+the change from DST. This is default to preserve existing behavior.
 
 ``True`` will specify that the given datetime should be interpreted as happening
 during daylight savings time, i.e. that the time specified is before the change
@@ -224,7 +224,7 @@
   This exception is a subclass of KeyError and raised when giving a time
   zone specification that can't be found::
 
-     >>> datetime.Timezone('Europe/New_York')
+     >>> datetime.zoneinfo('Europe/New_York')
      Traceback (most recent call last):
      ...
      UnknownTimeZoneError: There is no time zone called 'Europe/New_York'
@@ -250,8 +250,8 @@
 
 * ``NonExistentTimeError``
 
-  This exception is raised when giving a datetime specification that is ambiguous
-  while setting ``is_dst`` to None::
+  This exception is raised when giving a datetime specification for a time that due to
+  daylight saving does not exist, while setting ``is_dst`` to None::
 
     >>> datetime(2012, 3, 25, 2, 0, tzinfo=zoneinfo('Europe/Stockholm'), is_dst=None)
     >>>
@@ -266,13 +266,9 @@
 * ``all_timezones`` is the exhaustive list of the time zone names that can
   be used, listed alphabethically.
 
-* ``all_timezones_set`` is a set of the time zones in ``all_timezones``.
-
 * ``common_timezones`` is a list of useful, current time zones, listed
   alphabethically.
 
-* ``common_timezones_set`` is a set of the time zones in ``common_timezones``.
-
 
 The ``tzdata-update``-package
 -----------------------------

-- 
Repository URL: http://hg.python.org/peps


More information about the Python-checkins mailing list