GH-100234: Set a default value for random.expovariate() (GH-100235)

This commit is contained in:
Raymond Hettinger 2022-12-15 20:40:45 +02:00 committed by GitHub
parent 8356c14b4f
commit b430399d41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 2 deletions

View file

@ -577,7 +577,7 @@ class Random(_random.Random):
"""
return _exp(self.normalvariate(mu, sigma))
def expovariate(self, lambd):
def expovariate(self, lambd=1.0):
"""Exponential distribution.
lambd is 1.0 divided by the desired mean. It should be