Skip to content

Conversation

@rhettinger
Copy link
Contributor

@rhettinger rhettinger commented Jan 12, 2026

  • random_combinations_with_replacement() now treats elements as unique based on their position. This matches the behavior of itertools.combinations_with_replacement().
  • Sync the signature for random_product with itertools.products using the parameter *iterables instead of *args.
  • Add tests for all of the random combinatorics.

📚 Documentation preview 📚: https://cpython-previews--143762.org.readthedocs.build/

@rhettinger rhettinger merged commit a6bc60d into python:main Jan 12, 2026
28 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Jan 12, 2026
@rhettinger rhettinger deleted the random_combinatorics branch January 12, 2026 23:55
@rhettinger rhettinger added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Jan 12, 2026
@miss-islington-app
Copy link

Thanks @rhettinger for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Thanks @rhettinger for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @rhettinger, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker a6bc60da02ea37f33d5abe5e7028fb0876110b76 3.14

@miss-islington-app
Copy link

Sorry, @rhettinger, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker a6bc60da02ea37f33d5abe5e7028fb0876110b76 3.13

rhettinger added a commit to rhettinger/cpython that referenced this pull request Jan 13, 2026
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 13, 2026
…es (pythonGH-143764)

(cherry picked from commit 2426c45)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes skip issue skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant