summaryrefslogtreecommitdiff
path: root/Doc/library
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/datetime.rst8
1 files changed, 6 insertions, 2 deletions
diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst
index 16429de5b6..d612e8731c 100644
--- a/Doc/library/datetime.rst
+++ b/Doc/library/datetime.rst
@@ -270,8 +270,12 @@ Instance methods:
.. method:: timedelta.total_seconds()
- Return the total number of seconds contained in the duration. Equivalent to
- ``td.microseconds / 1000000 + td.seconds + td.days * 24 * 3600``.
+ Return the total number of seconds contained in the duration.
+ Equivalent to ``(td.microseconds + (td.seconds + td.days * 24 *
+ 3600) * 10**6) / 10**6`` computed with true division enabled.
+
+ Note that for very large time intervals (greater than 270 years on
+ most platforms) this method will lose microsecond accuracy.
.. versionadded:: 2.7