[3.11] Fix date.__repr__() docstring (#109422) (#109449)

Fix date.__repr__() docstring (#109422)

(cherry picked from commit 5eec58a9e5)

Co-authored-by: Christopher Yeh <chrisyeh96@users.noreply.github.com>
This commit is contained in:
Victor Stinner 2023-09-15 15:29:57 +02:00 committed by GitHub
parent 5a2550554b
commit 43191d294c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1002,13 +1002,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)" % (self.__class__.__module__,
self.__class__.__qualname__,