def open_csv_somehow(filename):
if PY3:<EOL><INDENT>return open_csv_somehow_py3(filename)<EOL><DEDENT>else:<EOL><INDENT>return open_csv_somehow_py2(filename)<EOL><DEDENT>
Given a filename that we're told is a CSV file, detect its encoding,
parse its header, and return a generator yielding its rows as dictionaries.