|
|
|
@ -3243,9 +3243,13 @@ static PyObject * |
|
|
|
timezone_richcompare(PyDateTime_TimeZone *self, |
|
|
|
PyDateTime_TimeZone *other, int op) |
|
|
|
{ |
|
|
|
if (op != Py_EQ && op != Py_NE) { |
|
|
|
Py_INCREF(Py_NotImplemented); |
|
|
|
return Py_NotImplemented; |
|
|
|
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); |
|
|
|
} |
|
|
|
|