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

Random should mention that ranges are inclusive #921

Closed
drathier opened this Issue Nov 20, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@drathier

drathier commented Nov 20, 2017

The Random module doesn't mention that ranges are inclusive, and they seem to hint at them being non-inclusive.

int 0 10 -- an integer between zero and ten reads to me as the possible values are 1,2,3,4,5,6,7,8,9, but both 0 and 10 may be generated.

@process-bot

This comment has been minimized.

Show comment
Hide comment
@process-bot

process-bot Nov 20, 2017

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

process-bot commented Nov 20, 2017

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

@evancz evancz added the docs label Mar 7, 2018

@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz May 22, 2018

Member

The latest docs use the example:

import Random

singleDigit : Random.Generator Int
singleDigit =
    Random.int 0 9

Which I hope will make it clearer.

Member

evancz commented May 22, 2018

The latest docs use the example:

import Random

singleDigit : Random.Generator Int
singleDigit =
    Random.int 0 9

Which I hope will make it clearer.

@evancz evancz closed this May 22, 2018

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