diff options
author | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2012-09-20 20:42:34 (GMT) |
---|---|---|
committer | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2012-09-20 20:42:34 (GMT) |
commit | 9b9ed867bc86232434e700153353b49e323ec02e (patch) | |
tree | 5b61008d4d8728e72ddd70e321e288c87d9f9709 /Modules | |
parent | 7c6c80d89f60c9b28cfb08d32c61108b16b2461a (diff) | |
parent | 3ec153681e4e5553fc6882699beb5af6d45c75e6 (diff) | |
download | cpython-9b9ed867bc86232434e700153353b49e323ec02e.zip cpython-9b9ed867bc86232434e700153353b49e323ec02e.tar.gz cpython-9b9ed867bc86232434e700153353b49e323ec02e.tar.bz2 |
merged 3.2
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_datetimemodule.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c index 6df5c03..01c85d1 100644 --- a/Modules/_datetimemodule.c +++ b/Modules/_datetimemodule.c @@ -3215,6 +3215,12 @@ timezone_richcompare(PyDateTime_TimeZone *self, { 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); } |