Fix date.__repr__() docstring (#109422)

This commit is contained in:
Christopher Yeh 2023-09-15 06:05:19 -07:00 committed by GitHub
parent b434dd7e36
commit 5eec58a9e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1015,13 +1015,9 @@ class date:
def __repr__(self):
"""Convert to formal string, for repr().
>>> dt = datetime(2010, 1, 1)
>>> repr(dt)
'datetime.datetime(2010, 1, 1, 0, 0)'
>>> dt = datetime(2010, 1, 1, tzinfo=timezone.utc)
>>> repr(dt)
'datetime.datetime(2010, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)'
>>> d = date(2010, 1, 1)
>>> repr(d)
'datetime.date(2010, 1, 1)'
"""
return "%s.%s(%d, %d, %d)" % (_get_class_module(self),
self.__class__.__qualname__,