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

feat: where_not #143

Closed
wants to merge 1 commit into from
Closed

Conversation

iloveitaly
Copy link
Contributor

Can add tests + docs if you like the idea!

@Suor
Copy link
Owner

Suor commented Jan 18, 2024

This kinda confusing that this where_not() will only let through items having none of the conditions satisfied, while I would expect it to be a complement of where(), i.e. letting through items where at least one condition is not satisfied being a complement of where().

Then again somebody would expect your behavior, which makes it a good idea to leave this for list comprehensions maybe.

@iloveitaly
Copy link
Contributor Author

@Suor I like OR instead of the current AND here: if people want AND, they can chain multiple where_not.

Still think it should be left to list comprehensions, or if I switch the logic here would this make more sense to add?

@Suor
Copy link
Owner

Suor commented Jan 30, 2024

Chaining is both wordy and inefficient and doesn't solve the core issue of many people understanding it wrong, be it either OR or AND.

@Suor Suor closed this Feb 21, 2024
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

Successfully merging this pull request may close these issues.

2 participants