diff options
author | Jürgen Gmach <juergen.gmach@googlemail.com> | 2019-08-24 19:48:55 (GMT) |
---|---|---|
committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-08-24 19:48:55 (GMT) |
commit | c5218fce02d6bd7bb343db20c8f14e8d9640783a (patch) | |
tree | 31aaf81683cd8ab229f22fb19b41c72706cb73b9 | |
parent | 69ee87e99cfe0b79389cffa92d126af868baf353 (diff) | |
download | cpython-c5218fce02d6bd7bb343db20c8f14e8d9640783a.zip cpython-c5218fce02d6bd7bb343db20c8f14e8d9640783a.tar.gz cpython-c5218fce02d6bd7bb343db20c8f14e8d9640783a.tar.bz2 |
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
-rw-r--r-- | Doc/library/datetime.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index c935e35..0135fa4 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -401,7 +401,7 @@ systems. .. class:: date(year, month, day) - All arguments are required. Arguments may be integers, in the following + All arguments are required. Arguments must be integers in the following ranges: * ``MINYEAR <= year <= MAXYEAR`` @@ -714,7 +714,7 @@ Constructor: .. class:: datetime(year, month, day, hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0) The year, month and day arguments are required. *tzinfo* may be ``None``, or an - instance of a :class:`tzinfo` subclass. The remaining arguments may be integers, + instance of a :class:`tzinfo` subclass. The remaining arguments must be integers in the following ranges: * ``MINYEAR <= year <= MAXYEAR``, @@ -1439,7 +1439,7 @@ day, and subject to adjustment via a :class:`tzinfo` object. .. class:: time(hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0) All arguments are optional. *tzinfo* may be ``None``, or an instance of a - :class:`tzinfo` subclass. The remaining arguments may be integers, in the + :class:`tzinfo` subclass. The remaining arguments must be integers in the following ranges: * ``0 <= hour < 24``, |