8000 Clarify argument types in datetime docs. (GH-15459) · python/cpython@d9140a2 · GitHub
[go: up one dir, main page]

Skip to content

Commit d9140a2

Browse files
Clarify argument types in datetime docs. (GH-15459)
"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>
1 parent 799e4e5 commit d9140a2

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``
@@ -707,7 +707,7 @@ Constructor:
707707
.. class:: datetime(year, month, day, hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0)
708708

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

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

14241424
All arguments are optional. *tzinfo* may be ``None``, or an instance of a
1425-
:class:`tzinfo` subclass. The remaining arguments may be integers, in the
1425+
:class:`tzinfo` subclass. The remaining arguments must be integers in the
14261426
following ranges:
14271427

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

0 commit comments

Comments
 (0)
0