def data(self, *keys):
if keys:<EOL><INDENT>d = {}<EOL>for key in keys:<EOL><INDENT>try:<EOL><INDENT>i = self.index(key)<EOL><DEDENT>except KeyError:<EOL><INDENT>d[key] = None<EOL><DEDENT>else:<EOL><INDENT>d[self.__keys[i]] = self[i]<EOL><DEDENT><DEDENT>return d<EOL><DEDENT>return dict(self)<EOL>
Return the keys and values of this record as a dictionary,
        optionally including only certain values by index or key. Keys
        provided in the items that are not in the record will be
        inserted with a value of :const:`None`; indexes provided
        that are out of bounds will trigger an :exc:`IndexError`.

        :param keys: indexes or keys of the items to include; if none
                      are provided, all values will be included
        :return: dictionary of values, keyed by field name
        :raises: :exc:`IndexError` if an out-of-bounds index is specified