astropy/astropy — pull request #1454 by mhvk (2013-09-15 00:51:35+00:00)
Title: Change interpretation of lists in Table.__getitem__ (closes #274)

While going through older issues, I noticed #274, that for `Table[[set-of-strings]]` there was a problem that the strings were incorrectly interpreted. By changing `__getitem__` to interpret strings similarly to tuples, this seems resolved. It passes all `astropy.test('table')`, but does it cause other problems?

```
In [1]: from astropy.table import Table

In [2]: a = [1, 4, 5]

In [3]: b = [2.0, 5.0, 8.2]

In [4]: c = ['x', 'y', 'z']

In [5]: t = Table([a, b, c], names=('a', 'b', 'c'), meta={'name': 'first table'})

In [6]: print t
a b c
--- --- ---
1 2.0 x
4 5.0 y
5 8.2 z

In [7]: print t[['a','b','c']]
a b c
--- --- ---
1 2.0 x
4 5.0 y
5 8.2 z

In [8]: print t[['b', 'a']] # Used to fail (exception)
b a
--- ---
2.0 1
5.0 4
8.2 5

In [9]: print t[['c', 'a', 'b']] # Used to give wrong order
c a b
--- --- ---
x 1 2.0
y 4 5.0
z 5 8.2
```