summaryrefslogtreecommitdiffstats
path: root/Lib/random.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-33144: Fix choosing random.Random._randbelow implementation. (GH-6563)Serhiy Storchaka2018-05-081-12/+10
| | | | random() takes precedence over getrandbits() if defined later in the class tree.
* bpo-33144: random.Random and subclasses: split _randbelow implementation ↵Wolfgang Maier2018-04-171-14/+38
| | | | (GH-6291)
* bpo-33203: Ensure random.choice always raises IndexError on empty sequence ↵Wolfgang Maier2018-04-051-0/+2
| | | | | | (GH-6338)
* bpo-31482: Missing bytes support for random.seed() version 1 (#3614)Raymond Hettinger2017-09-171-2/+3
| | | bpo-31482: Missing bytes support for random.seed() version 1 #3614
* random_triangular: sqrt() is more accurate than **0.5 (#3317)Raymond Hettinger2017-09-041-1/+1
|
* fix comment (#1798)leodema2017-06-041-1/+1
|
* bpo-16500: Don't use string constants for os.register_at_fork() behavior (#1834)Gregory P. Smith2017-05-291-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 Pitrou2017-05-271-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 Hettinger2016-12-271-1/+1
|
* Issue 28475: Improve error message for random.sample() with k < 0. ↵Raymond Hettinger2016-11-211-1/+1
| | | | (Contributed by Francisco Couzo).
* Fix typosRaymond Hettinger2016-11-131-1/+1
|
* Minor code beautificationRaymond Hettinger2016-11-021-2/+1
|
* Issue #18844: Make the various ways for specifing weights produce the same ↵Raymond Hettinger2016-10-291-3/+4
| | | | results.
* Issue #18844: Make the number of selections a keyword-only argument for ↵Raymond Hettinger2016-09-271-1/+1
| | | | random.choices().
* Rename weighted_choices() to just choices()Raymond Hettinger2016-09-071-3/+3
|
* Issue #18844: Add random.weighted_choices()Raymond Hettinger2016-09-071-1/+27
|
* os.urandom() now blocks on LinuxVictor Stinner2016-09-061-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.
* MergeRaymond Hettinger2016-09-041-3/+5
|\
| * Improve docs for random.seed()Raymond Hettinger2016-09-041-3/+5
| |
* | Minor beautification (turn nested-if into a conjunction).Raymond Hettinger2016-09-011-6/+5
| |
* | MergeRaymond Hettinger2016-08-311-0/+7
|\ \ | |/
| * Issue #27706: Fix regression in random.seed(somestr, version=1)Raymond Hettinger2016-08-311-0/+7
| |
* | Minor beautificationRaymond Hettinger2016-06-251-2/+2
|/
* Issue #27171: Fix typos in documentation, comments, and test function namesMartin Panter2016-06-021-1/+1
|
* mergeRaymond Hettinger2014-05-261-1/+4
|\
| * Issue 13355: Make random.triangular degrade gracefully when low == high.Raymond Hettinger2014-05-261-1/+4
| |
* | Improve readabilityRaymond Hettinger2014-05-191-1/+1
|/
* Issue #21470: Do a better job seeding the random number generatorRaymond Hettinger2014-05-141-1/+3
| | | | to fully cover its state space.
* Issue #19218: Rename collections.abc to _collections_abc in order to speed ↵Christian Heimes2013-10-131-1/+1
| | | | up interpreter start
* Minor clean-up of function parameters in random().Raymond Hettinger2013-10-061-12/+17
|\
| * Minor clean-up of function parameters in random().Raymond Hettinger2013-10-061-11/+17
| |
* | Issue #19169: Micro refactoring with a micro benefit for brevity and speed.Raymond Hettinger2013-10-061-2/+2
| |
* | Removing the merge conflict markers.Senthil Kumaran2013-09-121-5/+0
| | | | | | | | - my previous removal and hg resolve mark had still left them and hooks did not catch it too!
* | merge from 3.3Senthil Kumaran2013-09-121-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 Kumaran2013-09-121-0/+2
| | | | | | | | Addresses issue #14927
* | Issue #18783: Removed existing mentions of Python long type in docstrings,Serhiy Storchaka2013-08-271-1/+1
|\ \ | |/ | | | | error messages and comments.
| * Issue #18783: Removed existing mentions of Python long type in docstrings,Serhiy Storchaka2013-08-271-1/+1
| | | | | | | | error messages and comments.
* | Revert changes for #13355 by request from Raymond HettingerAndrew Svetlov2013-04-131-10/+0
|\ \ | |/
| * Revert changes for #13355 by request from Raymond HettingerAndrew Svetlov2013-04-131-10/+0
| |
* | Issue #13355: Raise ValueError on random.triangular call with invalid params.Andrew Svetlov2013-04-121-0/+10
|\ \ | |/ | | | | Initial patch by Yuriy Senko.
| * Issue #13355: Raise ValueError on random.triangular call with invalid params.Andrew Svetlov2013-04-121-0/+10
| | | | | | | | Initial patch by Yuriy Senko.
* | #17489: Add explanatory comment that __getstate__ is not called.R David Murray2013-04-021-0/+3
| | | | | | | | | | | | We don't put coverage directives in the stdlib, but anyone looking at a coverage report for Random should see the comment and understand why the lines aren't covered.
* | Issue #17141: random.vonmisesvariate() no more hangs for large kappas.Serhiy Storchaka2013-02-101-8/+6
|\ \ | |/
| * Issue #17141: random.vonmisesvariate() no more hangs for large kappas.Serhiy Storchaka2013-02-101-8/+6
| |\
| | * Issue #17141: random.vonmisesvariate() no more hangs for large kappas.Serhiy Storchaka2013-02-101-8/+6
| | |
* | | Issue #17149: merge fix from 3.3.Mark Dickinson2013-02-101-2/+2
|\ \ \ | |/ /
| * | Issue #17149: merge fix from 3.2.Mark Dickinson2013-02-101-2/+2
| |\ \ | | |/
| | * Issue #17149: Fix random.vonmisesvariate to always return results in [0, ↵Mark Dickinson2013-02-101-2/+2
| | | | | | | | | | | | 2*math.pi].
* | | Issue #15837: add some tests for random.shuffle().Antoine Pitrou2012-11-041-3/+4
|/ / | | | | | | Patch by Alessandro Moura.
* | Issue #14926: merge with 3.2Sandro Tosi2012-06-021-1/+1
|\ \ | |/