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

Improve the error message for "choices(population, 10)" #25267

Merged
merged 1 commit into from
Apr 20, 2021

Conversation

rhettinger
Copy link
Contributor

This a reasonably common error, so improve the error message to make it more obvious what the problem is and how to fix it:

TypeError: The number of choices must be a keyword argument: k=10

@miss-islington
Copy link
Contributor

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 20, 2021
(cherry picked from commit 2a36b09)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
@bedevere-bot
Copy link

GH-25477 is a backport of this pull request to the 3.9 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants