summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2004-09-16 01:30:50 (GMT)
committerTim Peters <tim.peters@gmail.com>2004-09-16 01:30:50 (GMT)
commit528ca53b7455b3307cb0e3f097ae951191521ba8 (patch)
treebad5eb084b5b64040699077cae94427ae750672f /Misc/NEWS
parentc74298a72b16d2ecca144df014014796f025ea08 (diff)
downloadcpython-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/NEWS10
1 files changed, 10 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 1ade365..fcc52d7 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -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.