diff --git a/aredis_om/model/model.py b/aredis_om/model/model.py index bdcd91b9..4cb07e9d 100644 --- a/aredis_om/model/model.py +++ b/aredis_om/model/model.py @@ -1195,15 +1195,11 @@ def to_string(s): step = 2 # Because the result has content offset = 1 # The first item is the count of total matches. - for i in xrange(1, len(res), step): - fields_offset = offset - + for i in range(1, len(res), step): fields = dict( - dict( - izip( - map(to_string, res[i + fields_offset][::2]), - map(to_string, res[i + fields_offset][1::2]), - ) + zip( + map(to_string, res[i + offset][::2]), + map(to_string, res[i + offset][1::2]), ) )