cpython: e948154af406 (original) (raw)

--- a/Lib/random.py +++ b/Lib/random.py @@ -341,16 +341,6 @@ class Random(_random.Random): http://en.wikipedia.org/wiki/Triangular_distribution[](#l1.4) """

-

- u = self.random() c = 0.5 if mode is None else (mode - low) / (high - low) if u > c:

--- a/Lib/test/test_random.py +++ b/Lib/test/test_random.py @@ -46,36 +46,6 @@ class TestBasicOps(unittest.TestCase): self.assertRaises(TypeError, self.gen.seed, 1, 2, 3, 4) self.assertRaises(TypeError, type(self.gen), [])

-

-

-

-

- def test_choice(self): choice = self.gen.choice with self.assertRaises(IndexError): @@ -519,7 +489,7 @@ class TestDistributions(unittest.TestCas for variate, args, expected in [ (g.uniform, (10.0, 10.0), 10.0), (g.triangular, (10.0, 10.0), 10.0),

--- a/Misc/ACKS +++ b/Misc/ACKS @@ -1088,7 +1088,6 @@ Nick Seidenman Žiga Seilnacht Yury Selivanov Fred Sells -Yuriy Senko Jiwon Seo Iñigo Serna Joakim Sernbrant

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -26,9 +26,6 @@ Core and Builtins Library ------- -- Issue #13355: Raise ValueError on random.triangular call with invalid params.