Miss Islington (bot)
0eaf7b975b
bpo-24567: Random subnormal.diff (GH-7954) (GH-7955)
...
Handle subnormal weights for choices()
(cherry picked from commit ddf7171911 )
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com >
2018-06-27 01:53:04 -07:00
Miss Islington (bot)
baf304e82e
bpo-33203: Ensure random.choice always raises IndexError on empty sequence (GH-6338) (GH-6387)
...
(cherry picked from commit 091e95e900 )
Co-authored-by: Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de >
2018-04-05 09:02:12 -07:00
Mike
53f7a7c281
bpo-32297: Few misspellings found in Python source code comments. ( #4803 )
...
* Fix multiple typos in code comments
* Add spacing in comments (test_logging.py, test_math.py)
* Fix spaces at the beginning of comments in test_logging.py
2017-12-14 13:04:53 +02:00
Oren Milman
d780b2d588
bpo-31478: Fix an assertion failure in random.seed() in case a seed has a bad __abs__() method. ( #3596 )
2017-09-28 10:50:01 +03:00
Raymond Hettinger
132a7d7cdb
bpo-31482: Missing bytes support for random.seed() version 1 ( #3614 )
...
bpo-31482: Missing bytes support for random.seed() version 1 #3614
2017-09-17 09:04:30 -07:00
Victor Stinner
da5e930187
bpo-31160: Fix test_random for zombie process ( #3045 )
...
TestModule.test_after_fork() now calls os.waitpid() to read the exit
status of the child process to avoid creating a zombie process.
2017-08-09 17:59:05 +02:00
Antoine Pitrou
346cbd351e
bpo-16500: Allow registering at-fork handlers ( #1715 )
...
* 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
2017-05-27 17:50:54 +02:00
csabella
f111fd2e65
bpo-30308: Code coverage for argument in random.shuffle ( #1504 )
...
* bpo-30308: Code coverage for argument in random.shuffle
* bpo-30308: Code coverage for argument in random.shuffle
* bpo-30308: Code coverage for argument in random.shuffle
2017-05-11 08:19:35 -07:00
bladebryan
9616a82e78
bpo-29960 _random.Random corrupted on exception in setstate(). ( #1019 )
2017-04-22 09:10:46 +03:00
Raymond Hettinger
e205f8b29e
merge
2016-11-21 15:32:26 -08:00
Raymond Hettinger
6023d33433
Issue #28743 : Reduce memory consumption for random module tests
2016-11-21 15:32:08 -08:00
Raymond Hettinger
6088cfcfd4
merge
2016-11-21 14:34:51 -08:00
Raymond Hettinger
bf87126a63
Issue 28475: Improve error message for random.sample() with k < 0. (Contributed by Francisco Couzo).
2016-11-21 14:34:33 -08:00
Raymond Hettinger
77f6411d96
merge
2016-11-13 00:44:24 -05:00
Raymond Hettinger
24e4239434
Fix typos
2016-11-13 00:42:56 -05:00
Raymond Hettinger
77d574d4ae
Issue #18844 : Strengthen tests to include a case with unequal weighting
2016-10-29 17:42:36 -07:00
Raymond Hettinger
30d00e54dd
Issue #18844 : Make the various ways for specifing weights produce the same results.
2016-10-29 16:55:36 -07:00
Raymond Hettinger
fdf6716ea9
merge
2016-10-29 17:43:02 -07:00
Raymond Hettinger
ba25f61490
merge
2016-10-29 16:57:09 -07:00
Victor Stinner
bd1b49a242
Close #28476 : Reuse math.factorial() in test_random
...
Patch written by Francisco Couzo.
2016-10-19 10:11:37 +02:00
Raymond Hettinger
7b16652f1c
Issue #18844 : Add more tests
2016-10-14 01:19:38 -04:00
Raymond Hettinger
1c3a121bb0
Issue #18844 : Fix-up examples for random.choices(). Remove over-specified test.
2016-10-12 01:42:10 -04:00
Raymond Hettinger
9016f2864a
Issue #18844 : Make the number of selections a keyword-only argument for random.choices().
2016-09-26 21:45:57 -07:00
Raymond Hettinger
28aa4a0684
Rename weighted_choices() to just choices()
2016-09-07 00:08:44 -07:00
Raymond Hettinger
e8f1e002c6
Issue #18844 : Add random.weighted_choices()
2016-09-06 17:15:29 -07:00