PEP 410: drop int type, add an argument against the datetime type

This commit is contained in:
Victor Stinner 2012-02-13 22:12:45 +01:00
parent 79b06628e2
commit 7bed2dcc53
1 changed files with 6 additions and 3 deletions

View File

@ -53,9 +53,8 @@ Add a *timestamp* optional argument to:
* time module: clock(), clock_gettime(), clock_getres(), time() and * time module: clock(), clock_gettime(), clock_getres(), time() and
wallclock() 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 * float
* decimal.Decimal * decimal.Decimal
@ -68,7 +67,8 @@ precision) in functions having timestamp arguments:
* time.gmtime(), time.localtime() * time.gmtime(), time.localtime()
* os.utimensat(), os.futimens() * 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:: .. note::
The decimal module is implemented in Python and is slow, but there is a C The decimal module is implemented in Python and is slow, but there is a C
@ -123,6 +123,9 @@ with the Python license.
datetime.datetime 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 datetime.datetime only supports microsecond resolution, but can be enhanced
to support nanosecond. to support nanosecond.