summaryrefslogtreecommitdiffstats
path: root/Lib/_pydatetime.py
diff options
context:
space:
mode:
authorChristopher Yeh <chrisyeh96@users.noreply.github.com>2023-09-15 13:05:19 (GMT)
committerGitHub <noreply@github.com>2023-09-15 13:05:19 (GMT)
commit5eec58a9e57383128ade7b527965b1efc474735b (patch)
tree0d0405dd6962e26372762b073ee0ff8b34ba5bab /Lib/_pydatetime.py
parentb434dd7e3625d442392b4adf952685c8adf769f7 (diff)
downloadcpython-5eec58a9e57383128ade7b527965b1efc474735b.zip
cpython-5eec58a9e57383128ade7b527965b1efc474735b.tar.gz
cpython-5eec58a9e57383128ade7b527965b1efc474735b.tar.bz2
Fix date.__repr__() docstring (#109422)
Diffstat (limited to 'Lib/_pydatetime.py')
-rw-r--r--Lib/_pydatetime.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/Lib/_pydatetime.py b/Lib/_pydatetime.py
index 4ffef65..8827548 100644
--- a/Lib/_pydatetime.py
+++ b/Lib/_pydatetime.py
@@ -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__,