]> granicus.if.org Git - python/commitdiff
bpo-34365: Update date object documentation (GH-8814)
authorDanish Prakash <grafitykoncept@gmail.com>
Tue, 11 Sep 2018 20:59:23 +0000 (02:29 +0530)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 11 Sep 2018 20:59:23 +0000 (13:59 -0700)
Python 3.x does not fall back to comparing object addresses when comparing two `dt` objects.

<!-- issue-number: [bpo-34365](https://www.bugs.python.org/issue34365) -->
https://bugs.python.org/issue34365
<!-- /issue-number -->

Doc/library/datetime.rst

index 53c181c4014a9c6157ff21b33d89a222b4f607e2..22582476cf95af92bb2ea12871a34eace818a696 100644 (file)
@@ -526,10 +526,9 @@ Notes:
 
 (4)
    In other words, ``date1 < date2`` if and only if ``date1.toordinal() <
-   date2.toordinal()``. In order to stop comparison from falling back to the
-   default scheme of comparing object addresses, date comparison normally raises
-   :exc:`TypeError` if the other comparand isn't also a :class:`date` object.
-   However, ``NotImplemented`` is returned instead if the other comparand has a
+   date2.toordinal()``. Date comparison raises :exc:`TypeError` if
+   the other comparand isn't also a :class:`date` object. However,
+   ``NotImplemented`` is returned instead if the other comparand has a
    :meth:`timetuple` attribute.  This hook gives other kinds of date objects a
    chance at implementing mixed-type comparison. If not, when a :class:`date`
    object is compared to an object of a different type, :exc:`TypeError` is raised