mirror of
https://github.com/python/cpython.git
synced 2025-08-13 13:29:13 +00:00
[3.12] Correct timedelta description (GH-101417) (GH-114938)
It only represents the difference between two datetime or
date objects, not between two time objects.
(cherry picked from commit 73d20cafb5
)
Co-authored-by: John Belmonte <john@neggie.net>
This commit is contained in:
parent
dee56434b5
commit
1eb873ef45
1 changed files with 3 additions and 3 deletions
|
@ -130,8 +130,8 @@ Available Types
|
||||||
.. class:: timedelta
|
.. class:: timedelta
|
||||||
:noindex:
|
:noindex:
|
||||||
|
|
||||||
A duration expressing the difference between two :class:`date`, :class:`.time`,
|
A duration expressing the difference between two :class:`.datetime`
|
||||||
or :class:`.datetime` instances to microsecond resolution.
|
or :class:`date` instances to microsecond resolution.
|
||||||
|
|
||||||
|
|
||||||
.. class:: tzinfo
|
.. class:: tzinfo
|
||||||
|
@ -203,7 +203,7 @@ objects.
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
A :class:`timedelta` object represents a duration, the difference between two
|
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)
|
.. class:: timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue