astropy/astropy — pull request #840 by taldcroft (2013-03-01 18:06:55+00:00)
Title: Swap the order of arguments in Column from name, data, .. to data, name, ..

Table `Column` and `MaskedColumn` will now have the initializer signature
```
def __new__(data=None, name=None, ...)
```

This was discussed in #726 and then made possible as a smooth transition by #731. In particular #731 (which is in 0.2) issues a warning if users call `Column` with an initial column name arg value instead of using keyword args.

In this PR there is some compatibility helper code. If the user supplies an initial arg value which is a string (corresponding to the pre-0.2 method), this raises an exception with a useful message:
```
>>> Column('a', [1, 2])
...
ValueError:
The first argument to Column is the string 'a', which was probably intended
as the column name. Starting in Astropy 0.3 the argument order for initializing
a Column object is Column(data=None, name=None, ...).
```