Closed CraigMiloRogers closed 4 years ago
Here is a proposed change to 'parse.py':
def __eq__(self, other):
if other is None:
return False
return self._name == other._name and self._offset == other._offset
However, there may be a style preference in the Python community for forcing the caller to protect against the None case (this is not quite the same situation as PEP 8 addresses).
In parse 1.12.0 and 1.12.1, FixedTzOffset.eq(...) fails when
other
is None. matplotlib triggers this behavior (see https://github.com/matplotlib/matplotlib/issues/15924). The matplotlib maintainer asserts that parse.py should return False in this case.