Fixes #186, probably the whole logic should be refactored as the approach of hardcoding iterators which we should not iterate on is bad. Let's think about it for 0.6, maybe that just means removing the ability to return a list/tuple from a function for multiple rows, as a generator would do the same.

This commit is contained in:
Romain Dorgueil
2017-10-15 14:09:57 +02:00
committed by GitHub
parent 3868dc6e3c
commit b0623c77c9

View File

@ -38,6 +38,6 @@ def tuplize(generator):
def iter_if_not_sequence(mixed): def iter_if_not_sequence(mixed):
if isinstance(mixed, (dict, list, str)): if isinstance(mixed, (dict, list, str, bytes, )):
raise TypeError(type(mixed).__name__) raise TypeError(type(mixed).__name__)
return iter(mixed) return iter(mixed)