Mark Dickinson <dicki...@gmail.com> added the comment: 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 trapped.) ---------- components: +Library (Lib) -Extension Modules nosy: +marketdickinson type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4869> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com