]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix date.__repr__() docstring (#109422)
authorChristopher Yeh <chrisyeh96@users.noreply.github.com>
Fri, 15 Sep 2023 13:05:19 +0000 (06:05 -0700)
committerGitHub <noreply@github.com>
Fri, 15 Sep 2023 13:05:19 +0000 (15:05 +0200)
Lib/_pydatetime.py

index 4ffef65c577e1fd9e4f41a9f95c6ba08e3672d6a..88275481e7002b0f0e79fbb0da63751e0d09500a 100644 (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__,