fix output_names to return list instead of KeyView on Python 3.