[Python-checkins] peps: PEP 410: drop int type, add an argument against the datetime type

victor.stinner python-checkins at python.org
Mon Feb 13 22:12:54 CET 2012


http://hg.python.org/peps/rev/c04f52d60af9
changeset:   4052:c04f52d60af9
user:        Victor Stinner <victor.stinner at haypocalc.com>
date:        Mon Feb 13 22:12:45 2012 +0100
summary:
  PEP 410: drop int type, add an argument against the datetime type

files:
  pep-0410.txt |  9 ++++++---
  1 files changed, 6 insertions(+), 3 deletions(-)


diff --git a/pep-0410.txt b/pep-0410.txt
--- a/pep-0410.txt
+++ b/pep-0410.txt
@@ -53,9 +53,8 @@
  * time module: clock(), clock_gettime(), clock_getres(), time() and
    wallclock()
 
-The *timestamp* argument is a type, there are three supported types:
+The *timestamp* argument is a type, there are two supported types:
 
- * int
  * float
  * decimal.Decimal
 
@@ -68,7 +67,8 @@
  * time.gmtime(), time.localtime()
  * os.utimensat(), os.futimens()
 
-The os.stat_float_times() is deprecated: use timestamp=int argument instead.
+The os.stat_float_times() is deprecated: use an explicit cast using int()
+instead.
 
 .. note::
    The decimal module is implemented in Python and is slow, but there is a C
@@ -123,6 +123,9 @@
 datetime.datetime
 -----------------
 
+Most functions returning timestamps don't have a known starting point or
+timezone information, and so cannot be converted to datetime.datetime.
+
 datetime.datetime only supports microsecond resolution, but can be enhanced
 to support nanosecond.
 

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


More information about the Python-checkins mailing list