random.gauss vs. random.normalvariate

John Haggerty bouncyinc at gmail.com
Sat Aug 15 22:34:36 CEST 2009


What does the term "thread safe" mean exactly. I never had to program with
"threads" before

On Sat, Aug 15, 2009 at 2:26 PM, Carl Banks <pavlovevidence at gmail.com>wrote:

> On Aug 15, 12:49 pm, Alan G Isaac <alan.is... at gmail.com> wrote:
> > Quotinghttp://docs.python.org/3.1/library/random.html#random.gauss:
> >     Gaussian distribution. mu is the mean, and sigma is the
> >     standard deviation. This is slightly faster than the
> >     normalvariate() function defined below.
> >
> > So since both are offered and gauss is faster, I assume it
> > must have some offsetting disadvantage.  What is it?
>
> random.gauss is not thread safe.
>
> I'm kind of surprised the html docs don't mention this; the docstring
> does.
>
>
> Carl Banks
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090815/fc464a1e/attachment.html>


More information about the Python-list mailing list