MAINT: Explicitly convert map to list when converting answer key values.

For compatibility with iterator version of map in Python 3.

Also always use iterator version of map,
so that code path is exercised in Python 2.
This commit is contained in:
Eddie Hebert
2014-01-06 11:05:27 -05:00
parent 98956f19ed
commit 68b78a6914
+4 -1
View File
@@ -22,6 +22,8 @@ import pytz
import xlrd
import requests
from six.moves import map
def col_letter_to_index(col_letter):
# Only supports single letter,
@@ -288,7 +290,8 @@ class AnswerKey(object):
def get_values(self, data_index):
value_parser = self.value_type_to_value_func[data_index.value_type]
return map(value_parser, self.get_raw_values(data_index))
return [value for value in
map(value_parser, self.get_raw_values(data_index))]
ANSWER_KEY = AnswerKey()