def __getitem__(self, arg):
res, flags =self._process_args_as_rows_or_columns(arg)<EOL>if '<STR_LIT>' in flags:<EOL><INDENT>if '<STR_LIT>' in flags:<EOL><INDENT>array = self.read_slice(res.start, res.stop, res.step)<EOL><DEDENT>else:<EOL><INDENT>array = self.read(rows=res)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return TableColumnSubset(self, res)<EOL><DEDENT>if self.lower:<EOL><INDENT>_names_to_lower_if_recarray(array)<EOL><DEDENT>elif self.upper:<EOL><INDENT>_names_to_upper_if_recarray(array)<EOL><DEDENT>self._maybe_trim_strings(array)<EOL>if '<STR_LIT>' in flags:<EOL><INDENT>assert array.shape[<NUM_LIT:0>] == <NUM_LIT:1><EOL>array = array[<NUM_LIT:0>]<EOL><DEDENT>return array<EOL>
Get data from a table using python [] notation.

You can use [] to extract column and row subsets, or read everything.
The notation is essentially the same as numpy [] notation, except that
a sequence of column names may also be given.  Examples reading from
"filename", extension "ext"

    fits=fitsio.FITS(filename)
    fits[ext][:]
    fits[ext][2]   # returns a scalar
    fits[ext][2:5]
    fits[ext][200:235:2]
    fits[ext][rows]
    fits[ext][cols][rows]

Note data are only read once the rows are specified.

Note you can only read variable length arrays the default way,
using this function, so set it as you want on construction.

This function is used for ascii tables as well