Message170780
I think the following simple patch should do the trick. I'll add some tests and commit. Should this get in 3.3.0?
diff -r 19c74cadea95 Modules/_datetimemodule.c
--- a/Modules/_datetimemodule.c Wed Sep 19 08:25:01 2012 +0300
+++ b/Modules/_datetimemodule.c Wed Sep 19 21:42:51 2012 -0400
@@ -3215,6 +3215,11 @@
{
if (op != Py_EQ && op != Py_NE)
Py_RETURN_NOTIMPLEMENTED;
+ if (Py_TYPE(other) != &PyDateTime_TimeZoneType)
+ if (op == Py_EQ)
+ Py_RETURN_FALSE;
+ else
+ Py_RETURN_TRUE;
return delta_richcompare(self->offset, other->offset, op);
} |
|
Date |
User |
Action |
Args |
2012-09-20 01:48:09 | belopolsky | set | recipients:
+ belopolsky, ronaldoussoren, r.david.murray, skrah, jftuga, lanhel |
2012-09-20 01:48:09 | belopolsky | set | messageid: <1348105689.21.0.178304655738.issue15973@psf.upfronthosting.co.za> |
2012-09-20 01:48:08 | belopolsky | link | issue15973 messages |
2012-09-20 01:48:08 | belopolsky | create | |
|