def _as_dict(self, r):
d = dict()<EOL>for i, f in enumerate(self._field_names):<EOL><INDENT>d[f] = r[i] if i < len(r) else None<EOL><DEDENT>return d<EOL>
Convert the record to a dictionary using field names as keys.