diff options
author | Tim Peters <tim.peters@gmail.com> | 2004-09-16 01:30:50 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2004-09-16 01:30:50 (GMT) |
commit | 528ca53b7455b3307cb0e3f097ae951191521ba8 (patch) | |
tree | bad5eb084b5b64040699077cae94427ae750672f /Misc/NEWS | |
parent | c74298a72b16d2ecca144df014014796f025ea08 (diff) | |
download | cpython-528ca53b7455b3307cb0e3f097ae951191521ba8.zip cpython-528ca53b7455b3307cb0e3f097ae951191521ba8.tar.gz cpython-528ca53b7455b3307cb0e3f097ae951191521ba8.tar.bz2 |
SF bug #1028306: date-datetime comparison
Treat comparing a date to a datetime like a mixed-type comparison.
Diffstat (limited to 'Misc/NEWS')
-rw-r--r-- | Misc/NEWS | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -22,6 +22,16 @@ Extension modules Library ------- +- SF bug #1028306: Trying to compare a ``datetime.date`` to a + ``datetime.datetime`` mistakenly compared only the year, month and day. + Now it acts like a mixed-type comparison: ``False`` for ``==``, + ``True`` for ``!=``, and raises ``TypeError`` for other comparison + operators. Because datetime is a subclass of date, comparing only the + base class (date) members can still be done, if that's desired, by + forcing using of the approprate date method; e.g., + ``a_date.__eq__(a_datetime)`` is true if and only if the year, month + and day members of ``a_date`` and ``a_datetime`` are equal. + - bdist_rpm now supports command line options --force-arch, {pre,post}-install, {pre,post}-uninstall, and {prep,build,install,clean,verify}-script. |