summaryrefslogtreecommitdiff
path: root/Doc/library/random.rst
Commit message (Collapse)AuthorAgeFilesLines
* Small improvements to the recipes and examples. (GH-19635)Raymond Hettinger2020-04-211-30/+26
| | | | | * Add underscores to long numbers to improve readability * Use bigger dataset in the bootstrapping example * Convert single-server queue example to more useful multi-server queue
* bpo-40325: Deprecate set object support in random.sample() (GH-19591)Raymond Hettinger2020-04-191-0/+7
|
* bpo-40282: Allow random.getrandbits(0) (GH-19539)Antoine Pitrou2020-04-171-0/+3
|
* bpo-40286: Add randbytes() method to random.Random (GH-19527)Victor Stinner2020-04-171-0/+7
| | | | | | | | | | | | Add random.randbytes() function and random.Random.randbytes() method to generate random bytes. Modify secrets.token_bytes() to use SystemRandom.randbytes() rather than calling directly os.urandom(). Rename also genrand_int32() to genrand_uint32(), since it returns an unsigned 32-bit integer, not a signed integer. The _random module is now built with Py_BUILD_CORE_MODULE defined.
* Doc: Fix s/pseudo random/pseudo-random/ (GH-18289)Julien Palard2020-01-311-2/+2
|
* bpo-38881: choices() raises ValueError when all weights are zero (GH-17362)Raymond Hettinger2019-11-231-2/+6
|
* bpo-32554: Deprecate hashing arbitrary types in random.seed() (GH-15382)Raymond Hettinger2019-08-221-0/+10
|
* bpo-37624: Document weight assumptions for random.choices() (GH-14855)Raymond Hettinger2019-07-191-1/+2
|
* bpo-33783: Use proper class markup for random.Random docs (GHè7817)Matthias Bussonnier2019-04-161-0/+5
| | | | Signed-off-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
* bpo-35904: Add statistics.fmean() (GH-11892)Raymond Hettinger2019-02-211-2/+2
|
* Improve readability of random module examples (GH-11884)Raymond Hettinger2019-02-151-2/+6
| | | Based on reviewer feedback from Allen Downey, convert ``lambda`` to ``def``.
* Document differences between random.choices() and random.choice(). (GH-11703)Raymond Hettinger2019-01-301-0/+7
|
* Neaten-up and extend the examples in the random module docs.Raymond Hettinger2016-12-041-10/+14
|
* Issue #28763: Use double hyphens (rendered as en-dashes) in numerical rangesSerhiy Storchaka2016-11-261-1/+1
|\ | | | | | | in the documentation.
| * Issue #28763: Use double hyphens (rendered as en-dashes) in numerical rangesSerhiy Storchaka2016-11-261-1/+1
| | | | | | | | in the documentation.
* | Fix grammarRaymond Hettinger2016-11-211-2/+2
| |
* | Add analysis section to motivate the single server queue exampleRaymond Hettinger2016-11-211-3/+10
| |
* | Misc readability and organization improvements for the random docsRaymond Hettinger2016-11-211-26/+31
| |
* | Add a seealso section for further reference and skill buildingRaymond Hettinger2016-11-211-0/+20
| |
* | Simplify code in an exampleRaymond Hettinger2016-11-211-6/+6
| |
* | Extend and improve the examples for the random moduleRaymond Hettinger2016-11-211-5/+29
| |
* | Small edits to the docs for sample() and shuffle().Raymond Hettinger2016-11-171-8/+14
| |
* | Further refinements to the examples and recipes for the random moduleRaymond Hettinger2016-11-171-16/+29
| |
* | Add another example to the recipes section of the random docsRaymond Hettinger2016-11-161-0/+26
| |
* | Minor touch-ups to the random module examplesRaymond Hettinger2016-11-161-5/+6
| |
* | Add cum_weights example (simulation of a cumulative binomial distribution).Raymond Hettinger2016-10-311-0/+7
| |
* | Issue #18844: Fix-up examples for random.choices(). Remove over-specified ↵Raymond Hettinger2016-10-121-31/+27
| | | | | | | | test.
* | Issue #18844: Make the number of selections a keyword-only argument for ↵Raymond Hettinger2016-09-261-1/+1
| | | | | | | | random.choices().
* | Rename weighted_choices() to just choices()Raymond Hettinger2016-09-071-1/+1
| |
* | Issue #18844: Add random.weighted_choices()Raymond Hettinger2016-09-061-0/+21
| |
* | MergeRaymond Hettinger2016-09-051-0/+6
|\ \ | |/
| * Improve recipe by showing results of intermediate stepsRaymond Hettinger2016-09-051-0/+6
| |
* | MergeRaymond Hettinger2016-09-041-2/+5
|\ \ | |/
| * Improve docs for random.seed()Raymond Hettinger2016-09-041-2/+5
| |
* | Documentation for secrets.pySteven D'Aprano2016-04-171-1/+2
|/
* Closes #25910: fix dead and permanently redirected links in the docs. Thanks ↵Georg Brandl2016-02-261-1/+1
| | | | to SilentGhost for the patch.
* Closes #20169: fix inner links random doc.Georg Brandl2016-02-191-6/+6
|
* By popular demand, add back a security warning.Raymond Hettinger2014-05-111-0/+5
|
* Remove the redundant and poorly worded warning message.Raymond Hettinger2014-05-101-6/+0
| | | | | | | | | | | The paragraph above already says, clearly and correctly, that "However, being completely deterministic, it is not suitable for all purposes, and is completely unsuitable for cryptographic purposes." Also we should make any promises about SystemRandom or os.urandom() being cryptographically secure (they may be, but be can't validate that promise). Further, those are actual random number generators not psuedo-random number generators.
* Issue #16190: fix random module recommendation to use ssl.RAND_bytes().Antoine Pitrou2013-08-161-3/+3
|
* #15831: merge with 3.2Ezio Melotti2012-09-141-5/+6
|\
| * #15831: document multiple signatures on different lines. Patch by Chris ↵Ezio Melotti2012-09-141-5/+6
| | | | | | | | Jerdonek.
* | merge with 3.2Sandro Tosi2012-08-121-1/+1
|\ \ | |/
| * it's getstatus() not setstatus(); thanks to Shaddi Hasan from docs@Sandro Tosi2012-08-121-1/+1
| |
* | Fix markupRaymond Hettinger2012-07-091-1/+1
| |
* | Issue 15265: document the exception raised for invalid sample sizes.Raymond Hettinger2012-07-081-0/+3
| |
* | merge with 3.2Sandro Tosi2012-04-141-1/+1
|\ \ | |/
| * fix typo; thanks to Jérôme Mainka from docs@Sandro Tosi2012-04-141-1/+1
| |
* | merge doc fixes from 3.2Georg Brandl2011-09-171-0/+7
|\ \ | |/
| * Add info from the docstring for random.gammavariate() to the docs.Georg Brandl2011-09-171-0/+7
| |