From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Fri, 2 Feb 2024 21:49:04 +0000 (+0100) Subject: [3.11] Correct timedelta description (GH-101417) (GH-114939) X-Git-Tag: v3.11.8~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4e1360ae50837575798d46e9943ae9bf7dcc6669;p=thirdparty%2FPython%2Fcpython.git [3.11] Correct timedelta description (GH-101417) (GH-114939) It only represents the difference between two datetime or date objects, not between two time objects. (cherry picked from commit 73d20cafb54193c94577ca60df1ba0410b3ced74) Co-authored-by: John Belmonte --- diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index af05c12ffd79..3fd41447f7da 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -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)