homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients belopolsky, jftuga, lanhel, r.david.murray, ronaldoussoren, skrah
Date 2012年09月20日.01:48:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1348105689.21.0.178304655738.issue15973@psf.upfronthosting.co.za>
In-reply-to
Content
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);
 }
History
Date User Action Args
2012年09月20日 01:48:09belopolskysetrecipients: + belopolsky, ronaldoussoren, r.david.murray, skrah, jftuga, lanhel
2012年09月20日 01:48:09belopolskysetmessageid: <1348105689.21.0.178304655738.issue15973@psf.upfronthosting.co.za>
2012年09月20日 01:48:08belopolskylinkissue15973 messages
2012年09月20日 01:48:08belopolskycreate

AltStyle によって変換されたページ (->オリジナル) /