Skip to content

Add usage notes for sample()#1037

Merged
bbayles merged 4 commits intomore-itertools:masterfrom
rhettinger:sample_usage_note
Jul 28, 2025
Merged

Add usage notes for sample()#1037
bbayles merged 4 commits intomore-itertools:masterfrom
rhettinger:sample_usage_note

Conversation

@rhettinger
Copy link
Copy Markdown
Contributor

@rhettinger rhettinger commented Jul 27, 2025

  • Works on inputs that aren't indexable (sets and dicts) and on inputs that are unsized (generators, etc)
  • Can give different answers depending on the underlying libmath implementation.
  • Isn't reproducible with unordered collections (sets).

@bbayles bbayles merged commit 622dcf4 into more-itertools:master Jul 28, 2025
6 checks passed
@rhettinger rhettinger deleted the sample_usage_note branch July 28, 2025 15:18
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