diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_datetimemodule.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c index 19d3d7e..b55922c 100644 --- a/Modules/_datetimemodule.c +++ b/Modules/_datetimemodule.c @@ -3741,11 +3741,8 @@ 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; + if (!PyTZInfo_Check(other)) { + Py_RETURN_NOTIMPLEMENTED; } return delta_richcompare(self->offset, other->offset, op); } |