astropy/astropy — pull request #2081 by taldcroft (2014-02-11 23:44:11+00:00)
Title: Fix / improve error message for comparisons

As first noticed in #1832, the error message for a failed Time comparison is broken. The current `OperandTypeError` class doesn't actually provide any error text. This PR fixes that and makes the messages more informative.
```
In [1]: from astropy.time import Time
In [2]: t1 = Time('J2000', scale='utc')
In [3]: t1 == None
ERROR: OperandTypeError: Unsupported operand type(s) for ==: 'Time' and 'NoneType' [astropy.time.core]
```
I don't think this rises to the level of needing mention in `CHANGES.rst`.