]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Correct timedelta description (GH-101417)
authorJohn Belmonte <john@neggie.net>
Fri, 2 Feb 2024 21:42:17 +0000 (06:42 +0900)
committerGitHub <noreply@github.com>
Fri, 2 Feb 2024 21:42:17 +0000 (23:42 +0200)
It only represents the difference between two datetime or
date objects, not between two time objects.

Doc/library/datetime.rst

index 735c3b24f81509e0eaf5fd4ed7d9154f3a8c4116..930af6cbbe9e8d12617e962a1f291e82e2be5a72 100644 (file)
@@ -130,8 +130,8 @@ Available Types
 .. class:: timedelta
    :noindex:
 
-   A duration expressing the difference between two :class:`date`, :class:`.time`,
-   or :class:`.datetime` instances to microsecond resolution.
+   A duration expressing the difference between two :class:`.datetime`
+   or :class:`date` instances to microsecond resolution.
 
 
 .. class:: tzinfo
@@ -203,7 +203,7 @@ objects.
 --------------------------
 
 A :class:`timedelta` object represents a duration, the difference between two
-dates or times.
+:class:`.datetime` or :class:`date` instances.
 
 .. class:: timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0)