diff options
| author | Raymond Hettinger <python@rcn.com> | 2016-11-21 22:34:51 (GMT) |
|---|---|---|
| committer | Raymond Hettinger <python@rcn.com> | 2016-11-21 22:34:51 (GMT) |
| commit | 6088cfcfd4be60930aee8c06ca6e72e0f29edef6 (patch) | |
| tree | 099df08fb26aedff268d5eadf7a5e57847b33a0d /Lib/random.py | |
| parent | e425bd95e9f3ceb767e1894cce8cc01a63e7013b (diff) | |
| parent | bf87126a636bddf2d9a8f432215fe2efb98ba8fe (diff) | |
| download | cpython-6088cfcfd4be60930aee8c06ca6e72e0f29edef6.zip cpython-6088cfcfd4be60930aee8c06ca6e72e0f29edef6.tar.gz cpython-6088cfcfd4be60930aee8c06ca6e72e0f29edef6.tar.bz2 | |
merge
Diffstat (limited to 'Lib/random.py')
| -rw-r--r-- | Lib/random.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/random.py b/Lib/random.py index ca90e14..49b0f14 100644 --- a/Lib/random.py +++ b/Lib/random.py @@ -314,7 +314,7 @@ class Random(_random.Random): randbelow = self._randbelow n = len(population) if not 0 <= k <= n: - raise ValueError("Sample larger than population") + raise ValueError("Sample larger than population or is negative") result = [None] * k setsize = 21 # size of a small set minus size of an empty list if k > 5: |
