summaryrefslogtreecommitdiffstats
path: root/Lib/random.py
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2022-02-15 23:12:15 (GMT)
committerGitHub <noreply@github.com>2022-02-15 23:12:15 (GMT)
commit08ec80113b3b7f7a9eaa3d217494536b63305181 (patch)
tree191ff93a92579d81ae5826a0e3e3cfe520e2d485 /Lib/random.py
parent1d81fdc4c004511c25f74db0e04ddbbb8a04ce6d (diff)
downloadcpython-08ec80113b3b7f7a9eaa3d217494536b63305181.zip
cpython-08ec80113b3b7f7a9eaa3d217494536b63305181.tar.gz
cpython-08ec80113b3b7f7a9eaa3d217494536b63305181.tar.bz2
bpo-46737: Add default arguments to random.gauss and normalvariate (GH-31360)
Diffstat (limited to 'Lib/random.py')
-rw-r--r--Lib/random.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/random.py b/Lib/random.py
index 6d7b617..1f3530e 100644
--- a/Lib/random.py
+++ b/Lib/random.py
@@ -538,7 +538,7 @@ class Random(_random.Random):
low, high = high, low
return low + (high - low) * _sqrt(u * c)
- def normalvariate(self, mu, sigma):
+ def normalvariate(self, mu=0.0, sigma=1.0):
"""Normal distribution.
mu is the mean, and sigma is the standard deviation.
@@ -559,7 +559,7 @@ class Random(_random.Random):
break
return mu + z * sigma
- def gauss(self, mu, sigma):
+ def gauss(self, mu=0.0, sigma=1.0):
"""Gaussian distribution.
mu is the mean, and sigma is the standard deviation. This is