lugensa / scorched

Sunburnt offspring solr client
MIT License
27 stars 19 forks source link

is_iter() in search only works for tuples and lists #30

Open xlotlu opened 8 years ago

xlotlu commented 8 years ago

search.is_iter returns False for sets (and others). A more appropriate implementation would be:

from collections import Iterable

try:
    basestring
except NameError:
    basestring = str

def is_iter(val):
    return not isinstance(val, basestring) and isinstance(val, Iterable)
delijati commented 8 years ago

Could you provide a pull request and a small test?