Skip to content

where() appears to be broken #16

Open
@markerikson

Description

@markerikson

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions