Skip to content

Commit 5eec58a

Browse files
authored
Fix date.__repr__() docstring (#109422)
1 parent b434dd7 commit 5eec58a

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Diff for: Lib/_pydatetime.py

+3-7
Original file line numberDiff line numberDiff line change
@@ -1015,13 +1015,9 @@ def fromisocalendar(cls, year, week, day):
10151015
def __repr__(self):
10161016
"""Convert to formal string, for repr().
10171017
1018-
>>> dt = datetime(2010, 1, 1)
1019-
>>> repr(dt)
1020-
'datetime.datetime(2010, 1, 1, 0, 0)'
1021-
1022-
>>> dt = datetime(2010, 1, 1, tzinfo=timezone.utc)
1023-
>>> repr(dt)
1024-
'datetime.datetime(2010, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)'
1018+
>>> d = date(2010, 1, 1)
1019+
>>> repr(d)
1020+
'datetime.date(2010, 1, 1)'
10251021
"""
10261022
return "%s.%s(%d, %d, %d)" % (_get_class_module(self),
10271023
self.__class__.__qualname__,

0 commit comments

Comments
 (0)