astropy/astropy — pull request #1872 by taldcroft (2013-12-06 21:49:31+00:00)
Title: Change the subclassing pattern for MaskedColumn

As originally discussed in #1471 and https://github.com/numpy/numpy/issues/4086, the original `MaskedColumn` implementation did not subclass `MaskedArray` in the pattern that was intended by the numpy.ma developers. We used the `np.ndarray` subclassing, but for `MaskedArray` one should do something like:
```
class MSubArray(SubArray, MaskedArray):
def __new__(cls, data, info={}, mask=nomask):
subarr = SubArray(data, info)
_data = MaskedArray.__new__(cls, data=subarr, mask=mask)
_data.info = subarr.info
return _data
```
This seemingly small change ended up turning into a biggish reorganization of the Column classes in order to not introduce any change in behavior. As a benefit the two mostly-similar `Column.__new__` and `MaskedColumn.__new__` are now handled with one `BaseColumn.__new__`.

I still need to back out #1471 and https://github.com/astropy/astropy/commit/ff6039e8 to make sure that this update is really fixing everything.