Skip to content

Commit ffe43b2

Browse files
[3.8] Clarify argument types in datetime docs. (GH-15459) (GH-15472)
"Arguments may be integers... " could be misunderstand as they also could be strings. New wording makes it clear that arguments have to be integers. modified: Doc/library/datetime.rst Automerge-Triggered-By: @pganssle (cherry picked from commit c5218fc) Co-authored-by: Jürgen Gmach <juergen.gmach@googlemail.com> Automerge-Triggered-By: @pganssle
1 parent a842494 commit ffe43b2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Doc/library/datetime.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ systems.
401401

402402
.. class:: date(year, month, day)
403403

404-
All arguments are required. Arguments may be integers, in the following
404+
All arguments are required. Arguments must be integers in the following
405405
ranges:
406406

407407
* ``MINYEAR <= year <= MAXYEAR``
@@ -714,7 +714,7 @@ Constructor:
714714
.. class:: datetime(year, month, day, hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0)
715715

716716
The year, month and day arguments are required. *tzinfo* may be ``None``, or an
717-
instance of a :class:`tzinfo` subclass. The remaining arguments may be integers,
717+
instance of a :class:`tzinfo` subclass. The remaining arguments must be integers
718718
in the following ranges:
719719

720720
* ``MINYEAR <= year <= MAXYEAR``,
@@ -1439,7 +1439,7 @@ day, and subject to adjustment via a :class:`tzinfo` object.
14391439
.. class:: time(hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0)
14401440

14411441
All arguments are optional. *tzinfo* may be ``None``, or an instance of a
1442-
:class:`tzinfo` subclass. The remaining arguments may be integers, in the
1442+
:class:`tzinfo` subclass. The remaining arguments must be integers in the
14431443
following ranges:
14441444

14451445
* ``0 <= hour < 24``,

0 commit comments

Comments
 (0)