mirror of
https://github.com/wassname/catalyst.git
synced 2026-10-01 12:01:05 +08:00
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:
1 parent
98956f19ed
commit
68b78a6914
1 file changed
+4
-1
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user