Author Kevin.Norris
Recipients Kevin.Norris, docs@python
Date 2018-08-09.05:03:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The 3.x datetime documentation contains the following footnote:

> 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 TypeError if the other comparand isn’t also a date object. However, NotImplemented is returned instead if the other comparand has a timetuple() attribute. This hook gives other kinds of date objects a chance at implementing mixed-type comparison. If not, when a date object is compared to an object of a different type, TypeError is raised unless the comparison is == or !=. The latter cases return False or True, respectively.

But in 3.x, comparison no longer falls back to comparing object addresses.  Also, some of the comments on issue 8005 seem to suggest that this footnote is not actually true in 3.x (aside from the first sentence, of course).  But regardless, the footnote should not refer to a long dead interpreter behavior as if it were still around.
Date User Action Args
2018-08-09 05:03:49Kevin.Norrissetrecipients: + Kevin.Norris, docs@python
2018-08-09 05:03:49Kevin.Norrissetmessageid: <>
2018-08-09 05:03:49Kevin.Norrislinkissue34365 messages
2018-08-09 05:03:49Kevin.Norriscreate