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

Fix .shuffled() #53

Merged
merged 3 commits into from
Apr 23, 2024
Merged

Fix .shuffled() #53

merged 3 commits into from
Apr 23, 2024

Conversation

InSyncWithFoo
Copy link
Contributor

Fixes #52. I'm not sure what to do with the tests.

@qexat
Copy link
Owner

qexat commented Apr 23, 2024

Thank you for your contribution! Would you mind putting the second commit as a separate PR? I missed the fact that it was in the same function... Sorry!

@qexat
Copy link
Owner

qexat commented Apr 23, 2024

Regarding the tests I suppose the regression makes sense because choice and shuffle algorithms are very dissimilar. I guess we can run that on normal lists and copy the results?

(Overall I should fix the tests cause they're pretty bad written, not gonna lie)

@qexat qexat added the fix Fix an issue label Apr 23, 2024
@qexat qexat modified the milestones: v2.3.x, v2.4.x Apr 23, 2024
@qexat qexat enabled auto-merge (squash) April 23, 2024 20:45
@qexat qexat merged commit e7694cb into qexat:main Apr 23, 2024
4 checks passed
qexat added a commit that referenced this pull request Apr 23, 2024
* Fix `.shuffled()`

* Prefer `.copy()` to `[:]`

* fix: test regression

---------

Co-authored-by: qexat <contact@qexat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Fix an issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: incorrect implementation of .shuffled() + bad performance
2 participants