-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
gh-118131: Command-line interface for the random module
#118132
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
Conversation
|
Personally, I don't support this proposal but won't stand in the way of it either. It seems gratuitous. |
| return randint(1, args.integer) | ||
|
|
||
| if args.float is not None: | ||
| return uniform(1, args.float) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In #118131 this was specced for floats to use the range between 0 and N of length N, which would be more useful and makes a lot more sense than the range between 1 and N of length N - 1.
randommodule #118131📚 Documentation preview 📚: https://cpython-previews--118132.org.readthedocs.build/en/118132/library/random.html#command-line-usage