mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
Correct timedelta description (GH-101417)
It only represents the difference between two datetime or date objects, not between two time objects.
This commit is contained in:
parent
b27812d632
commit
73d20cafb5
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