Skip to content

Commit b559573

Browse files
authored
typo
1 parent db8a9a5 commit b559573

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Lib/datetime.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -466,11 +466,11 @@ def _check_time_fields(hour, minute, second, microsecond, submicrosecond, fold):
466466
raise ValueError('second must be in 0..59', second)
467467
if not 0 <= microsecond <= 999999:
468468
raise ValueError('microsecond must be in 0..999999', microsecond)
469-
if not 0 <= microsecond <= 999:
469+
if not 0 <= submicrosecond <= 999:
470470
raise ValueError('Currently submicrosecond must be in 0..999', submicrosecond)
471471
if fold not in (0, 1):
472472
raise ValueError('fold must be either 0 or 1', fold)
473-
return hour, minute, second, microsecond, submicrosecond fold
473+
return hour, minute, second, microsecond, submicrosecond, fold
474474

475475

476476
def _check_tzinfo_arg(tz):
@@ -1295,7 +1295,7 @@ class time:
12951295
"""
12961296
__slots__ = '_hour', '_minute', '_second', '_microsecond', '_submicrosecond', '_tzinfo', '_hashcode', '_fold'
12971297

1298-
def __new__(cls, hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0):
1298+
def __new__(cls, hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0, submicrosecond=0):
12991299
"""Constructor.
13001300
13011301
Arguments:
@@ -1321,8 +1321,8 @@ def __new__(cls, hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold
13211321
self.__setstate(hour, minute or None)
13221322
self._hashcode = -1
13231323
return self
1324-
hour, minute, second, microsecond, fold = _check_time_fields(
1325-
hour, minute, second, microsecond, fold)
1324+
hour, minute, second, microsecond, submicrosecond, fold = _check_time_fields(
1325+
hour, minute, second, microsecond, submicrosecond, fold)
13261326
_check_tzinfo_arg(tzinfo)
13271327
self = object.__new__(cls)
13281328
self._hour = hour

0 commit comments

Comments
 (0)