This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2009年09月28日 03:56 by jgsack, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg93190 - (view) | Author: James G. sack (jim) (jgsack) | Date: 2009年09月28日 03:56 | |
Docs for 2.6.2 (http://docs.python.org/library/random.html? highlight=random#module-random) presently say """ random.randint(a, b) Return a random integer N such that a <= N <= b. """ It should say ...a <= N < b I wonder if there are other mistakes there in upper limit docs? ~jim |
|||
| msg93192 - (view) | Author: Senthil Kumaran (orsenthil) * (Python committer) | Date: 2009年09月28日 04:37 | |
Not actually a bug. The documentation is correct. Do, random.randint(0,1) a couple of times and you see 1 appearing. If still not convinced, look into the random.py see that randint(a, b) actually does a return self.randrange(a, b+1) |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:53 | admin | set | github: 51258 |
| 2009年09月28日 04:37:24 | orsenthil | set | status: open -> closed nosy: + orsenthil messages: + msg93192 resolution: not a bug |
| 2009年09月28日 03:56:44 | jgsack | create | |