Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | bpo-38881: choices() raises ValueError when all weights are zero (GH-17362) | Raymond Hettinger | 2019-11-23 | 1 | -1/+3 |
| | |||||
* | bpo-32554: Deprecate hashing arbitrary types in random.seed() (GH-15382) | Raymond Hettinger | 2019-08-22 | 1 | -2/+13 |
| | |||||
* | bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-13700) | Serhiy Storchaka | 2019-06-01 | 1 | -1/+1 |
| | |||||
* | bpo-36559: random module: optimize sha512 import (GH-12742) | Christian Heimes | 2019-04-10 | 1 | -1/+8 |
| | | | | | | The random module now prefers the lean internal _sha512 module over hashlib for seed(version=2) to optimize import time. Signed-off-by: Christian Heimes <christian@python.org> | ||||
* | Convert range to repeat for choices() (#11889) | Raymond Hettinger | 2019-02-16 | 1 | -3/+3 |
| | |||||
* | Be consistent about the use of from-imports in random module (GH-11837) | Raymond Hettinger | 2019-02-13 | 1 | -4/+4 |
| | | | Minor code clean-up. | ||||
* | bpo-35782: Fix error message in randrange (GH-11620) | Kumar Akshay | 2019-01-21 | 1 | -1/+1 |
| | | | https://bugs.python.org/issue35782 | ||||
* | bpo-30561: Sync-up expovariate() and gammavariate code (GH-1934) | leodema | 2018-12-24 | 1 | -4/+1 |
| | |||||
* | bpo-35513, unittest: TextTestRunner uses time.perf_counter() (GH-11180) | Victor Stinner | 2018-12-17 | 1 | -2/+2 |
| | | | | | | | TextTestRunner of unittest.runner now uses time.perf_counter() rather than time.time() to measure the execution time of a test: time.time() can go backwards, whereas time.perf_counter() is monotonic. Similar change made in libregrtest, pprint and random. | ||||
* | Remove unnecessary and over-restrictive type check (GH-10905) | Raymond Hettinger | 2018-12-04 | 1 | -2/+0 |
| | |||||
* | Add comments regarding speed/space/entropy trade-offs (GH-10885) | Raymond Hettinger | 2018-12-04 | 1 | -0/+13 |
| | |||||
* | Hoist the float conversion out of the inner loop. (GH-10430) | Raymond Hettinger | 2018-11-09 | 1 | -1/+2 |
| | | | Currently, the *n* and *total* variables get converted to floats each time they are multiplied by random(). This minor tweak does the conversion just once and gets a small speedup (approx 3%). | ||||
* | Minor code refactoring. Compute len() one fewer times on one code path. ↵ | Raymond Hettinger | 2018-07-04 | 1 | -4/+4 |
| | | | | (GH-8094) | ||||
* | bpo-24567: Random subnormal.diff (#7954) | Raymond Hettinger | 2018-06-27 | 1 | -1/+3 |
| | | | | | Handle subnormal weights for choices() | ||||
* | bpo-33144: Fix choosing random.Random._randbelow implementation. (GH-6563) | Serhiy Storchaka | 2018-05-08 | 1 | -12/+10 |
| | | | | random() takes precedence over getrandbits() if defined later in the class tree. | ||||
* | bpo-33144: random.Random and subclasses: split _randbelow implementation ↵ | Wolfgang Maier | 2018-04-17 | 1 | -14/+38 |
| | | | | (GH-6291) | ||||
* | bpo-33203: Ensure random.choice always raises IndexError on empty sequence ↵ | Wolfgang Maier | 2018-04-05 | 1 | -0/+2 |
| | | | | | | (GH-6338) | ||||
* | bpo-31482: Missing bytes support for random.seed() version 1 (#3614) | Raymond Hettinger | 2017-09-17 | 1 | -2/+3 |
| | | | bpo-31482: Missing bytes support for random.seed() version 1 #3614 | ||||
* | random_triangular: sqrt() is more accurate than **0.5 (#3317) | Raymond Hettinger | 2017-09-04 | 1 | -1/+1 |
| | |||||
* | fix comment (#1798) | leodema | 2017-06-04 | 1 | -1/+1 |
| | |||||
* | bpo-16500: Don't use string constants for os.register_at_fork() behavior (#1834) | Gregory P. Smith | 2017-05-29 | 1 | -1/+1 |
| | | | | Instead use keyword only arguments to os.register_at_fork for each of the scenarios. Updates the documentation for clarity. | ||||
* | bpo-16500: Allow registering at-fork handlers (#1715) | Antoine Pitrou | 2017-05-27 | 1 | -0/+5 |
| | | | | | | | | | | | | * bpo-16500: Allow registering at-fork handlers * Address Serhiy's comments * Add doc for new C API * Add doc for new Python-facing function * Add NEWS entry + doc nit | ||||
* | Issue #29055: Suppress upstream exception for random.choice() | Raymond Hettinger | 2016-12-27 | 1 | -1/+1 |
| | |||||
* | Issue 28475: Improve error message for random.sample() with k < 0. ↵ | Raymond Hettinger | 2016-11-21 | 1 | -1/+1 |
| | | | | (Contributed by Francisco Couzo). | ||||
* | Fix typos | Raymond Hettinger | 2016-11-13 | 1 | -1/+1 |
| | |||||
* | Minor code beautification | Raymond Hettinger | 2016-11-02 | 1 | -2/+1 |
| | |||||
* | Issue #18844: Make the various ways for specifing weights produce the same ↵ | Raymond Hettinger | 2016-10-29 | 1 | -3/+4 |
| | | | | results. | ||||
* | Issue #18844: Make the number of selections a keyword-only argument for ↵ | Raymond Hettinger | 2016-09-27 | 1 | -1/+1 |
| | | | | random.choices(). | ||||
* | Rename weighted_choices() to just choices() | Raymond Hettinger | 2016-09-07 | 1 | -3/+3 |
| | |||||
* | Issue #18844: Add random.weighted_choices() | Raymond Hettinger | 2016-09-07 | 1 | -1/+27 |
| | |||||
* | os.urandom() now blocks on Linux | Victor Stinner | 2016-09-06 | 1 | -9/+0 |
| | | | | | | | Issue #27776: The os.urandom() function does now block on Linux 3.17 and newer until the system urandom entropy pool is initialized to increase the security. This change is part of the PEP 524. | ||||
* | Merge | Raymond Hettinger | 2016-09-04 | 1 | -3/+5 |
|\ | |||||
| * | Improve docs for random.seed() | Raymond Hettinger | 2016-09-04 | 1 | -3/+5 |
| | | |||||
* | | Minor beautification (turn nested-if into a conjunction). | Raymond Hettinger | 2016-09-01 | 1 | -6/+5 |
| | | |||||
* | | Merge | Raymond Hettinger | 2016-08-31 | 1 | -0/+7 |
|\ \ | |/ | |||||
| * | Issue #27706: Fix regression in random.seed(somestr, version=1) | Raymond Hettinger | 2016-08-31 | 1 | -0/+7 |
| | | |||||
* | | Minor beautification | Raymond Hettinger | 2016-06-25 | 1 | -2/+2 |
|/ | |||||
* | Issue #27171: Fix typos in documentation, comments, and test function names | Martin Panter | 2016-06-02 | 1 | -1/+1 |
| | |||||
* | merge | Raymond Hettinger | 2014-05-26 | 1 | -1/+4 |
|\ | |||||
| * | Issue 13355: Make random.triangular degrade gracefully when low == high. | Raymond Hettinger | 2014-05-26 | 1 | -1/+4 |
| | | |||||
* | | Improve readability | Raymond Hettinger | 2014-05-19 | 1 | -1/+1 |
|/ | |||||
* | Issue #21470: Do a better job seeding the random number generator | Raymond Hettinger | 2014-05-14 | 1 | -1/+3 |
| | | | | to fully cover its state space. | ||||
* | Issue #19218: Rename collections.abc to _collections_abc in order to speed ↵ | Christian Heimes | 2013-10-13 | 1 | -1/+1 |
| | | | | up interpreter start | ||||
* | Minor clean-up of function parameters in random(). | Raymond Hettinger | 2013-10-06 | 1 | -12/+17 |
|\ | |||||
| * | Minor clean-up of function parameters in random(). | Raymond Hettinger | 2013-10-06 | 1 | -11/+17 |
| | | |||||
* | | Issue #19169: Micro refactoring with a micro benefit for brevity and speed. | Raymond Hettinger | 2013-10-06 | 1 | -2/+2 |
| | | |||||
* | | Removing the merge conflict markers. | Senthil Kumaran | 2013-09-12 | 1 | -5/+0 |
| | | | | | | | | - my previous removal and hg resolve mark had still left them and hooks did not catch it too! | ||||
* | | merge from 3.3 | Senthil Kumaran | 2013-09-12 | 1 | -0/+7 |
|\ \ | |/ | | | | | | | Improve the docstring of random.shuffle. Inform users not to provide int arg. Addresses issue #14927 | ||||
| * | Improve the docstring of random.shuffle. Inform users not to provide int arg. | Senthil Kumaran | 2013-09-12 | 1 | -0/+2 |
| | | | | | | | | Addresses issue #14927 | ||||
* | | Issue #18783: Removed existing mentions of Python long type in docstrings, | Serhiy Storchaka | 2013-08-27 | 1 | -1/+1 |
|\ \ | |/ | | | | | error messages and comments. |