This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients kbriggs, mark.dickinson
Date 2009-01-07.17:06:22
SpamBayes Score 0.1408708
Marked as misclassified No
Message-id <>
An exponential distribution with parameter 0 isn't an exponential distribution any more.  On the real line, there isn't
even a limiting distribution as the parameter approaches 0.

Is there really any use for having expovariate degenerate this way?
It seems much more likely that a call to random.expovariate(0) is
caused by a bug somewhere, so should raise an exception.  Which is exactly 
what it does already.

The proposed change would also not be in keeping with the philosophy 
behind most of Python's mathematics, which is to raise exceptions rather 
than returning exceptional (nan, inf) results.  (Think of it as IEEE 754 
will the invalid, overflow and division-by-zero signals all being 
Date User Action Args
2009-01-07 17:06:26mark.dickinsonsetrecipients: + mark.dickinson, kbriggs
2009-01-07 17:06:26mark.dickinsonsetmessageid: <>
2009-01-07 17:06:23mark.dickinsonlinkissue4869 messages
2009-01-07 17:06:22mark.dickinsoncreate