Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xlotlu opened this issue Apr 21, 2016 · 1 comment
Open

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

xlotlu opened this issue Apr 21, 2016 · 1 comment

Comments

@xlotlu
Copy link

xlotlu commented Apr 21, 2016

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
Copy link
Collaborator

Could you provide a pull request and a small test?

mamico added a commit to mamico/scorched that referenced this issue Jul 24, 2016
delijati added a commit that referenced this issue Aug 29, 2016
fix is_iter implementation. see #30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants