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

where() appears to be broken #16

Open
markerikson opened this issue Oct 2, 2015 · 0 comments
Open

where() appears to be broken #16

markerikson opened this issue Oct 2, 2015 · 0 comments

Comments

@markerikson
Copy link

The current tests for _.where() only test with a single key:value pair to filter by. I'm seeing behavior that looks like the function does not work properly if there are multiple key:value pairs. Specifically, it seems like the code will actually return True if the very first pair checked matches, rather than waiting for ALL of them to match.

Looking at the code, I believe the "return True" line merely needs to be unindented to be outside the "for key, value" loop, thus only returning successfully if all pairs match.

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

1 participant