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:
@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user