Skip to content

Fix set intersection_update implementation #5405

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

Merged

Conversation

crazymerlyn
Copy link
Contributor

The previous implementation had multiple bugs:

The new implementation uses the approach chosen by cpython, i.e., create a normal intersection and then replace self with the result.

Allows turning on one test in test_weakset. The equivalent test in test_set still fails due to some of the other set operations also being buggy on self application.

Copy link
Member

@coolreader18 coolreader18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for contributing!

@coolreader18 coolreader18 merged commit 740aeed into RustPython:main Sep 20, 2024
11 checks passed
@crazymerlyn crazymerlyn deleted the fix-set-intersection-update branch September 20, 2024 02:39
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