diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2012-02-08 22:03:19 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2012-02-08 22:03:19 (GMT) |
commit | 4195b5caea0fe1446160e78d69420732ead7e78b (patch) | |
tree | 5c01264aed26942fcb932f9aab73856dd65af684 /Doc/whatsnew/3.3.rst | |
parent | 72476eae5fe4d7bc4d4c4e30471cd83a501707de (diff) | |
download | cpython-4195b5caea0fe1446160e78d69420732ead7e78b.zip cpython-4195b5caea0fe1446160e78d69420732ead7e78b.tar.gz cpython-4195b5caea0fe1446160e78d69420732ead7e78b.tar.bz2 |
Backout f8409b3d6449: the PEP 410 is not accepted yet
Diffstat (limited to 'Doc/whatsnew/3.3.rst')
-rw-r--r-- | Doc/whatsnew/3.3.rst | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/Doc/whatsnew/3.3.rst b/Doc/whatsnew/3.3.rst index 67408c6..8739584 100644 --- a/Doc/whatsnew/3.3.rst +++ b/Doc/whatsnew/3.3.rst @@ -270,42 +270,6 @@ new, more precise information:: '<function C.D.meth at 0x7f46b9fe31e0>' -PEP 410: Use decimal.Decimal type for timestamps -================================================ - -:pep:`410` - Use decimal.Decimal type for timestamps - PEP written and implemented by Victor Stinner. - -The following functions have a new optional *timestamp* argument to get a -timestamp as a :class:`decimal.Decimal` instead of :class:`int` or -:class:`float`: - - * :mod:`time` module: :func:`~time.clock`, :func:`~time.clock_gettime`, - :func:`~time.clock_getres`, :func:`~time.monotonic`, :func:`~time.time` and - :func:`~time.wallclock` - * :mod:`os` module: :func:`~os.fstat`, :func:`~os.fstatat`, :func:`~os.lstat` - and :func:`~os.stat` (``st_atime``, ``st_ctime`` and ``st_mtime`` fields of - the stat structure) - -:class:`decimal.Decimal` supports a resolution of a nanosecond (10^-9) -resolution, whereas :class:`float` has only a resolution of a microsecond -(10^-6) in common cases. See the list of available :ref:`timestamp types -<timestamp-types>`. - -Example:: - - >>> import decimal, time - >>> time.time() - 1328006975.681211 - >>> time.time(timestamp=int) - 1328006979 - >>> time.time(timestamp=decimal.Decimal) - Decimal('1328006983.761119') - -:func:`os.stat_float_times` has been deprecated, use *timestamp* argument of -`os.stat` instead. - - Other Language Changes ====================== |