diff options
author | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2013-08-04 18:51:35 (GMT) |
---|---|---|
committer | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2013-08-04 18:51:35 (GMT) |
commit | 790d269d393fe625614db5cc8fe8ad0d4029253d (patch) | |
tree | 98bf336596290e65a119f014c75a419143ad3744 /Doc | |
parent | 5e5a8230c206e5762b5d4c0708189422c1b1f3b1 (diff) | |
download | cpython-790d269d393fe625614db5cc8fe8ad0d4029253d.zip cpython-790d269d393fe625614db5cc8fe8ad0d4029253d.tar.gz cpython-790d269d393fe625614db5cc8fe8ad0d4029253d.tar.bz2 |
Fixes #8860: Round half-microseconds to even in the timedelta constructor.
(Original patch by Mark Dickinson.)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/datetime.rst | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index 9d0af67..5bcac47 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -170,10 +170,12 @@ dates or times. * ``0 <= seconds < 3600*24`` (the number of seconds in one day) * ``-999999999 <= days <= 999999999`` - If any argument is a float and there are fractional microseconds, the fractional - microseconds left over from all arguments are combined and their sum is rounded - to the nearest microsecond. If no argument is a float, the conversion and - normalization processes are exact (no information is lost). + If any argument is a float and there are fractional microseconds, + the fractional microseconds left over from all arguments are + combined and their sum is rounded to the nearest microsecond using + round-half-to-even tiebreaker. If no argument is a float, the + conversion and normalization processes are exact (no information is + lost). If the normalized value of days lies outside the indicated range, :exc:`OverflowError` is raised. |